Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotImplemented = errors.New("cloud: not implemented")
ErrNotImplemented is the error returned if a method is not implemented.
Functions ¶
func Register ¶
func Register(name ProviderName, factory Factory)
Register registers a cloud provider factory by name.
The cloud MUST have a name: lower case and one word.
Types ¶
type Factory ¶
Factory is a function that returns a Provider interface. An error is returned if the cloud provider fails to initialize, nil otherwise.
func GetFactory ¶
func GetFactory(name ProviderName) (Factory, error)
GetFactory returns a factory of cloud provider by name.
type Interface ¶
type Interface interface { // Name returns the cloud provider name. Name() ProviderName // DescribeRegions returns a list of regions. DescribeRegions() ([]*Region, error) // DescribeZones returns a list of availability zones within a region. DescribeZones(region string) ([]*Zone, error) // DescribeVPCs returns a list of VPCs within a region. DescribeVPCs(region string) ([]*VPC, error) // DescribeSubnets returns a list of subnets within a VPC. DescribeSubnets(region, vpcID string) ([]*Subnet, error) }
Interface defines the interface that should be implemented by a cloud provider.
func GetInstance ¶
func GetInstance(name ProviderName) (Interface, error)
GetInstance returns an instance of cloud provider by name.
Click to show internal directories.
Click to hide internal directories.