kubernetes: github.com/erimatnor/kubernetes/pkg/cloudprovider/aws Index | Files

package aws_cloud

import "github.com/erimatnor/kubernetes/pkg/cloudprovider/aws"

Index

Package Files

aws.go

type AWSCloud Uses

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

AWSCloud is an implementation of Interface, TCPLoadBalancer and Instances for Amazon Web Services.

func (*AWSCloud) AttachDisk Uses

func (aws *AWSCloud) AttachDisk(instanceName string, diskName string, readOnly bool) (string, error)

Implements Volumes.AttachDisk

func (*AWSCloud) Clusters Uses

func (aws *AWSCloud) Clusters() (cloudprovider.Clusters, bool)

func (*AWSCloud) Configure Uses

func (v *AWSCloud) Configure(name string, spec *api.NodeSpec) error

func (*AWSCloud) CreateVolume Uses

func (aws *AWSCloud) CreateVolume(volumeOptions *VolumeOptions) (string, error)

Implements Volumes.CreateVolume

func (*AWSCloud) DeleteVolume Uses

func (aws *AWSCloud) DeleteVolume(volumeName string) error

Implements Volumes.DeleteVolume

func (*AWSCloud) DetachDisk Uses

func (aws *AWSCloud) DetachDisk(instanceName string, diskName string) error

Implements Volumes.DetachDisk

func (*AWSCloud) ExternalID Uses

func (aws *AWSCloud) ExternalID(name string) (string, error)

ExternalID returns the cloud provider ID of the specified instance.

func (*AWSCloud) GetNodeResources Uses

func (aws *AWSCloud) GetNodeResources(name string) (*api.NodeResources, error)

GetNodeResources implements Instances.GetNodeResources

func (*AWSCloud) GetZone Uses

func (self *AWSCloud) GetZone() (cloudprovider.Zone, error)

GetZone implements Zones.GetZone

func (*AWSCloud) Instances Uses

func (aws *AWSCloud) Instances() (cloudprovider.Instances, bool)

Instances returns an implementation of Instances for Amazon Web Services.

func (*AWSCloud) List Uses

func (aws *AWSCloud) List(filter string) ([]string, error)

List is an implementation of Instances.List.

func (*AWSCloud) NodeAddresses Uses

func (aws *AWSCloud) NodeAddresses(name string) ([]api.NodeAddress, error)

NodeAddresses is an implementation of Instances.NodeAddresses.

func (*AWSCloud) Release Uses

func (v *AWSCloud) Release(name string) error

func (*AWSCloud) TCPLoadBalancer Uses

func (aws *AWSCloud) TCPLoadBalancer() (cloudprovider.TCPLoadBalancer, bool)

TCPLoadBalancer returns an implementation of TCPLoadBalancer for Amazon Web Services.

func (*AWSCloud) Zones Uses

func (aws *AWSCloud) Zones() (cloudprovider.Zones, bool)

Zones returns an implementation of Zones for Amazon Web Services.

type AWSCloudConfig Uses

type AWSCloudConfig struct {
    Global struct {
        // TODO: Is there any use for this?  We can get it from the instance metadata service
        Zone string
    }
}

type AWSMetadata Uses

type AWSMetadata interface {
    // Query the EC2 metadata service (used to discover instance-id etc)
    GetMetaData(key string) ([]byte, error)
}

Abstraction over the AWS metadata service

type AuthFunc Uses

type AuthFunc func() (auth aws.Auth, err error)

type EC2 Uses

type EC2 interface {
    // Query EC2 for instances matching the filter
    Instances(instIds []string, filter *ec2InstanceFilter) (resp *ec2.InstancesResp, err error)

    // Attach a volume to an instance
    AttachVolume(volumeID string, instanceId string, mountDevice string) (resp *ec2.AttachVolumeResp, err error)
    // Detach a volume from whatever instance it is attached to
    // TODO: We should specify the InstanceID and the Device, for safety
    DetachVolume(volumeID string) (resp *ec2.SimpleResp, err error)
    // Lists volumes
    Volumes(volumeIDs []string, filter *ec2.Filter) (resp *ec2.VolumesResp, err error)
    // Create an EBS volume
    CreateVolume(request *ec2.CreateVolume) (resp *ec2.CreateVolumeResp, err error)
    // Delete an EBS volume
    DeleteVolume(volumeID string) (resp *ec2.SimpleResp, err error)
}

Abstraction over EC2, to allow mocking/other implementations

type VolumeOptions Uses

type VolumeOptions struct {
    CapacityMB int
}

type Volumes Uses

type Volumes interface {
    // Attach the disk to the specified instance
    // instanceName can be empty to mean "the instance on which we are running"
    // Returns the device (e.g. /dev/xvdf) where we attached the volume
    AttachDisk(instanceName string, volumeName string, readOnly bool) (string, error)
    // Detach the disk from the specified instance
    // instanceName can be empty to mean "the instance on which we are running"
    DetachDisk(instanceName string, volumeName string) error

    // Create a volume with the specified options
    CreateVolume(volumeOptions *VolumeOptions) (volumeName string, err error)
    DeleteVolume(volumeName string) error
}

Volumes is an interface for managing cloud-provisioned volumes

Package aws_cloud imports 16 packages (graph). Updated 2017-05-11. Refresh now. Tools for package owners.