cloudprovider

package
v0.4.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterCloudProvider

func RegisterCloudProvider(name string, cloud Factory)

RegisterCloudProvider registers a cloudprovider.Factory by name. This is expected to happen during app startup.

Types

type ArchonInterface

type ArchonInterface interface {
	EnsureNetwork(clusterName string, network *cluster.Network) (status *cluster.NetworkStatus, err error)
	EnsureNetworkDeleted(clusterName string, network *cluster.Network) error

	ListInstances(clusterName string, network *cluster.Network, selector map[string]string) (names []string, instances []*cluster.InstanceStatus, err error)
	GetInstance(clusterName string, instance *cluster.Instance) (status *cluster.InstanceStatus, err error)
	EnsureInstance(clusterName string, instance *cluster.Instance) (status *cluster.InstanceStatus, err error)
	EnsureInstanceDeleted(clusterName string, instance *cluster.Instance) error

	PublicIP() (PublicIPInterface, bool)
	PrivateIP() (PrivateIPInterface, bool)
}

type Factory

type Factory func(config io.Reader) (Interface, error)

Factory is a function that returns a cloudprovider.Interface. The config parameter provides an io.Reader handler to the factory in order to load specific configurations. If no configuration is provided the parameter is nil.

type Interface

type Interface interface {
	cloudprovider.Interface
	Archon() (ArchonInterface, bool)
}

func GetCloudProvider

func GetCloudProvider(name string, config io.Reader) (Interface, error)

GetCloudProvider creates an instance of the named cloud provider, or nil if the name is not known. The error return is only used if the named provider was known but failed to initialize. The config parameter specifies the io.Reader handler of the configuration file for the cloud provider, or nil for no configuation.

func InitCloudProvider

func InitCloudProvider(name string, configFilePath string) (Interface, error)

InitCloudProvider creates an instance of the named cloud provider.

type PrivateIPInterface

type PrivateIPInterface interface {
	EnsurePrivateIP(clusterName string, instance *cluster.Instance) (status *cluster.InstanceStatus, err error)
	EnsurePrivateIPDeleted(clusterName string, instance *cluster.Instance) error
}

type PublicIPInterface

type PublicIPInterface interface {
	EnsurePublicIP(clusterName string, instance *cluster.Instance) (status *cluster.InstanceStatus, err error)
	EnsurePublicIPDeleted(clusterName string, instance *cluster.Instance) error
}

Directories

Path Synopsis
aws

Jump to

Keyboard shortcuts

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