package elbtest

import "github.com/crowdmob/goamz/elb/elbtest"

Package elbtest implements a fake ELB provider with the capability of inducing errors on any given operation, and retrospectively determining what operations have been carried out.

Index

Types

type Server

type Server struct {
	// contains filtered or unexported fields
}

Server implements an ELB simulator for use in testing.

func NewServer

func NewServer() (*Server, error)

Starts and returns a new server

func (*Server) ChangeInstanceState

func (srv *Server) ChangeInstanceState(lb string, state elb.InstanceState)

func (*Server) DeregisterInstance

func (srv *Server) DeregisterInstance(instId, lbName string)

func (*Server) NewInstance

func (srv *Server) NewInstance() string

Creates a fake instance in the server

func (*Server) NewLoadBalancer

func (srv *Server) NewLoadBalancer(name string)

Creates a fake load balancer in the fake server

func (*Server) Quit

func (srv *Server) Quit()

Quit closes down the server.

func (*Server) RegisterInstance

func (srv *Server) RegisterInstance(instId, lbName string)

Register a fake instance with a fake Load Balancer

If the Load Balancer does not exists it does nothing

func (*Server) RemoveInstance

func (srv *Server) RemoveInstance(instId string)

Removes a fake instance from the server

If no instance is found it does nothing

func (*Server) RemoveLoadBalancer

func (srv *Server) RemoveLoadBalancer(name string)

Removes a fake load balancer from the fake server

func (*Server) URL

func (srv *Server) URL() string

URL returns the URL of the server.

Source Files

server.go

Version
v0.0.0-20150128194925-3a06871fe9fc (latest)
Published
Jan 28, 2015
Platform
linux/amd64
Imports
10 packages
Last checked
10 months ago

Tools for package owners.