fake

package
v0.3.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 13, 2017 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const ProviderName = "fake"

Variables

View Source
var (
	ErrorNotFound = fmt.Errorf("Instance is not found")
)

Functions

This section is empty.

Types

type FakeCloud

type FakeCloud struct {
	fake.FakeCloud
	FakeInstances map[string]FakeInstance
}

FakeCloud is a test-double implementation of Interface, LoadBalancer, Instances, and Routes. It is useful for testing.

func (*FakeCloud) AddNetworkAnnotation

func (f *FakeCloud) AddNetworkAnnotation(clustername string, instance *cluster.Instance, network *cluster.Network) error

func (*FakeCloud) Archon

func (*FakeCloud) EnsureInstance

func (f *FakeCloud) EnsureInstance(clusterName string, instance *cluster.Instance) (*cluster.InstanceStatus, error)

EnsureLoadBalancer is a test-spy implementation of LoadBalancer.EnsureLoadBalancer. It adds an entry "create" into the internal method call record.

func (*FakeCloud) EnsureInstanceDeleted

func (f *FakeCloud) EnsureInstanceDeleted(clusterName string, instance *cluster.Instance) error

EnsureLoadBalancerDeleted is a test-spy implementation of LoadBalancer.EnsureLoadBalancerDeleted. It adds an entry "delete" into the internal method call record.

func (*FakeCloud) EnsureNetwork

func (f *FakeCloud) EnsureNetwork(clusterName string, network *cluster.Network) (status *cluster.NetworkStatus, err error)

func (*FakeCloud) EnsureNetworkDeleted

func (f *FakeCloud) EnsureNetworkDeleted(clusterName string, network *cluster.Network) (err error)

func (*FakeCloud) GetInstance

func (f *FakeCloud) GetInstance(clusterName string, instance *cluster.Instance) (*cluster.InstanceStatus, error)

GetLoadBalancer is a stub implementation of LoadBalancer.GetLoadBalancer.

func (*FakeCloud) ListInstances

func (f *FakeCloud) ListInstances(clusterName string, network *cluster.Network, selector map[string]string) ([]string, []*cluster.InstanceStatus, error)

List is a test-spy implementation of Instances.List. It adds an entry "list" into the internal method call record.

func (*FakeCloud) PrivateIP

func (*FakeCloud) PublicIP

type FakeInstance

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL