kubernetes: github.com/erikstmartin/kubernetes/pkg/cloudprovider Index | Files | Directories

package cloudprovider

import "github.com/erikstmartin/kubernetes/pkg/cloudprovider"

Package cloudprovider supplies interfaces and implementations for cloud service providers.

Index

Package Files

cloud.go doc.go plugins.go

func RegisterCloudProvider Uses

func RegisterCloudProvider(name string, cloud Factory)

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

type Factory Uses

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 Instances Uses

type Instances interface {
    // IPAddress returns an IP address of the specified instance.
    IPAddress(name string) (net.IP, error)
    // List lists instances that match 'filter' which is a regular expression which must match the entire instance name (fqdn)
    List(filter string) ([]string, error)
    // GetNodeResources gets the resources for a particular node
    GetNodeResources(name string) (*api.NodeResources, error)
}

Instances is an abstract, pluggable interface for sets of instances.

type Interface Uses

type Interface interface {
    // TCPLoadBalancer returns a balancer interface. Also returns true if the interface is supported, false otherwise.
    TCPLoadBalancer() (TCPLoadBalancer, bool)
    // Instances returns an instances interface. Also returns true if the interface is supported, false otherwise.
    Instances() (Instances, bool)
    // Zones returns a zones interface. Also returns true if the interface is supported, false otherwise.
    Zones() (Zones, bool)
}

Interface is an abstract, pluggable interface for cloud providers.

func GetCloudProvider Uses

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 Uses

func InitCloudProvider(name string, configFilePath string) Interface

InitCloudProvider creates an instance of the named cloud provider.

type TCPLoadBalancer Uses

type TCPLoadBalancer interface {
    // TCPLoadBalancerExists returns whether the specified load balancer exists.
    // TODO: Break this up into different interfaces (LB, etc) when we have more than one type of service
    TCPLoadBalancerExists(name, region string) (bool, error)
    // CreateTCPLoadBalancer creates a new tcp load balancer.
    CreateTCPLoadBalancer(name, region string, port int, hosts []string) error
    // UpdateTCPLoadBalancer updates hosts under the specified load balancer.
    UpdateTCPLoadBalancer(name, region string, hosts []string) error
    // DeleteTCPLoadBalancer deletes a specified load balancer.
    DeleteTCPLoadBalancer(name, region string) error
}

TCPLoadBalancer is an abstract, pluggable interface for TCP load balancers.

type Zone Uses

type Zone struct {
    FailureDomain string
    Region        string
}

Zone represents the location of a particular machine.

type Zones Uses

type Zones interface {
    // GetZone returns the Zone containing the current failure zone and locality region that the program is running in
    GetZone() (Zone, error)
}

Zones is an abstract, pluggable interface for zone enumeration.

Directories

PathSynopsis
aws
controllerPackage controller contains code for syncing cloud instances with minion registry
fakePackage fake_cloud is a test-double implementation of cloudprovider Interface, TCPLoadBalancer and Instances.
gcePackage gce_cloud is an implementation of Interface, TCPLoadBalancer and Instances for Google Compute Engine.
openstack
ovirt
vagrantPackage vagrant_cloud is an implementation of Interface, TCPLoadBalancer and Instances for developer managed Vagrant cluster.

Package cloudprovider imports 6 packages (graph). Updated 2018-04-10. Refresh now. Tools for package owners.