Documentation ¶
Index ¶
- Constants
- Variables
- type FakeCloud
- func (f *FakeCloud) AddNetworkAnnotation(clustername string, instance *cluster.Instance, network *cluster.Network) error
- func (f *FakeCloud) Archon() (archoncloudprovider.ArchonInterface, bool)
- func (f *FakeCloud) EnsureInstance(clusterName string, instance *cluster.Instance) (*cluster.InstanceStatus, error)
- func (f *FakeCloud) EnsureInstanceDeleted(clusterName string, instance *cluster.Instance) error
- func (f *FakeCloud) EnsureNetwork(clusterName string, network *cluster.Network) (status *cluster.NetworkStatus, err error)
- func (f *FakeCloud) EnsureNetworkDeleted(clusterName string, network *cluster.Network) (err error)
- func (f *FakeCloud) GetInstance(clusterName string, instance *cluster.Instance) (*cluster.InstanceStatus, error)
- func (f *FakeCloud) ListInstances(clusterName string, network *cluster.Network, selector map[string]string) ([]string, []*cluster.InstanceStatus, error)
- func (f *FakeCloud) PrivateIP() (archoncloudprovider.PrivateIPInterface, bool)
- func (f *FakeCloud) PublicIP() (archoncloudprovider.PublicIPInterface, bool)
- type FakeInstance
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 (*FakeCloud) Archon ¶
func (f *FakeCloud) Archon() (archoncloudprovider.ArchonInterface, bool)
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 ¶
EnsureLoadBalancerDeleted is a test-spy implementation of LoadBalancer.EnsureLoadBalancerDeleted. It adds an entry "delete" into the internal method call record.
func (*FakeCloud) EnsureNetwork ¶
func (*FakeCloud) EnsureNetworkDeleted ¶
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 (f *FakeCloud) PrivateIP() (archoncloudprovider.PrivateIPInterface, bool)
func (*FakeCloud) PublicIP ¶
func (f *FakeCloud) PublicIP() (archoncloudprovider.PublicIPInterface, bool)
type FakeInstance ¶
type FakeInstance struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.