Documentation ¶
Index ¶
- Constants
- func GetLogger() aws.Logger
- func GetMetadata(key MetadataKey) (string, error)
- func GetRegion() (string, error)
- func NewAutoScalingGroupPlugin(client autoscalingiface.AutoScalingAPI, namespaceTags map[string]string) instance.Plugin
- func NewInstancePlugin(client ec2iface.EC2API, namespaceTags map[string]string) instance.Plugin
- func NewInstanceProfilePlugin(client iamiface.IAMAPI, namespaceTags map[string]string) instance.Plugin
- func NewInternetGatewayPlugin(client ec2iface.EC2API, namespaceTags map[string]string) instance.Plugin
- func NewLaunchConfigurationPlugin(client autoscalingiface.AutoScalingAPI, namespaceTags map[string]string) instance.Plugin
- func NewLoadBalancerPlugin(client elbiface.ELBAPI, namespaceTags map[string]string) instance.Plugin
- func NewLogGroupPlugin(client cloudwatchlogsiface.CloudWatchLogsAPI, namespaceTags map[string]string) instance.Plugin
- func NewQueuePlugin(client sqsiface.SQSAPI, namespaceTags map[string]string) instance.Plugin
- func NewRolePlugin(client iamiface.IAMAPI, namespaceTags map[string]string) instance.Plugin
- func NewRouteTablePlugin(client ec2iface.EC2API, namespaceTags map[string]string) instance.Plugin
- func NewSecurityGroupPlugin(client ec2iface.EC2API, namespaceTags map[string]string) instance.Plugin
- func NewSpotInstancePlugin(client ec2iface.EC2API, namespaceTags map[string]string) instance.Plugin
- func NewSubnetPlugin(client ec2iface.EC2API, namespaceTags map[string]string) instance.Plugin
- func NewTablePlugin(client dynamodbiface.DynamoDBAPI, namespaceTags map[string]string) instance.Plugin
- func NewVolumePlugin(client ec2iface.EC2API, namespaceTags map[string]string) instance.Plugin
- func NewVpcPlugin(client ec2iface.EC2API, namespaceTags map[string]string) instance.Plugin
- type Builder
- type CreateInstanceRequest
- type CreateSpotInstanceRequest
- type ErrExceededAttempts
- type ErrInvalidRequest
- type ErrUnexpectedResponse
- type MetadataKey
- type Monitor
- type Options
Constants ¶
const ( // VolumeTag is the AWS tag name used to associate unique identifiers (instance.VolumeID) with volumes. VolumeTag = "docker-infrakit-volume" // AttachmentEBSVolume is the type name used in instance.Attachment AttachmentEBSVolume = "ebs" )
const ( // MetadataAmiID - AMI ID MetadataAmiID = MetadataKey("http://169.254.169.254/latest/meta-data/ami-id") // MetadataInstanceID - Instance ID MetadataInstanceID = MetadataKey("http://169.254.169.254/latest/meta-data/instance-id") // MetadataInstanceType - Instance type MetadataInstanceType = MetadataKey("http://169.254.169.254/latest/meta-data/instance-type") // MetadataHostname - Host name MetadataHostname = MetadataKey("http://169.254.169.254/latest/meta-data/hostname") // MetadataLocalIPv4 - Local IPv4 address MetadataLocalIPv4 = MetadataKey("http://169.254.169.254/latest/meta-data/local-ipv4") // MetadataPublicIPv4 - Public IPv4 address MetadataPublicIPv4 = MetadataKey("http://169.254.169.254/latest/meta-data/public-ipv4") // MetadataAvailabilityZone - Availability zone MetadataAvailabilityZone = MetadataKey("http://169.254.169.254/latest/meta-data/placement/availability-zone") )
Variables ¶
This section is empty.
Functions ¶
func GetMetadata ¶
func GetMetadata(key MetadataKey) (string, error)
GetMetadata returns the value of the metadata by key
func NewAutoScalingGroupPlugin ¶
func NewAutoScalingGroupPlugin(client autoscalingiface.AutoScalingAPI, namespaceTags map[string]string) instance.Plugin
NewAutoScalingGroupPlugin returns a plugin.
func NewInstancePlugin ¶
NewInstancePlugin creates a new plugin that creates instances in AWS EC2.
func NewInstanceProfilePlugin ¶
func NewInstanceProfilePlugin(client iamiface.IAMAPI, namespaceTags map[string]string) instance.Plugin
NewInstanceProfilePlugin returns a plugin.
func NewInternetGatewayPlugin ¶
func NewInternetGatewayPlugin(client ec2iface.EC2API, namespaceTags map[string]string) instance.Plugin
NewInternetGatewayPlugin returns a plugin.
func NewLaunchConfigurationPlugin ¶
func NewLaunchConfigurationPlugin(client autoscalingiface.AutoScalingAPI, namespaceTags map[string]string) instance.Plugin
NewLaunchConfigurationPlugin returns a plugin.
func NewLoadBalancerPlugin ¶
NewLoadBalancerPlugin returns a plugin.
func NewLogGroupPlugin ¶
func NewLogGroupPlugin(client cloudwatchlogsiface.CloudWatchLogsAPI, namespaceTags map[string]string) instance.Plugin
NewLogGroupPlugin returns a plugin.
func NewQueuePlugin ¶
NewQueuePlugin returns a plugin.
func NewRolePlugin ¶
NewRolePlugin returns a plugin.
func NewRouteTablePlugin ¶
NewRouteTablePlugin returns a plugin.
func NewSecurityGroupPlugin ¶
func NewSecurityGroupPlugin(client ec2iface.EC2API, namespaceTags map[string]string) instance.Plugin
NewSecurityGroupPlugin returns a plugin.
func NewSpotInstancePlugin ¶
NewSpotInstancePlugin creates a new plugin that creates spot instances in AWS EC2.
func NewSubnetPlugin ¶
NewSubnetPlugin returns a plugin.
func NewTablePlugin ¶
func NewTablePlugin(client dynamodbiface.DynamoDBAPI, namespaceTags map[string]string) instance.Plugin
NewTablePlugin returns a plugin.
func NewVolumePlugin ¶
NewVolumePlugin returns a plugin.
Types ¶
type Builder ¶
type Builder struct { Config client.ConfigProvider Options Options }
Builder is a ProvisionerBuilder that creates an AWS instance provisioner.
func (*Builder) BuildInstancePlugin ¶
BuildInstancePlugin creates an instance Provisioner configured with the Flags.
type CreateInstanceRequest ¶
type CreateInstanceRequest struct { Tags map[string]string RunInstancesInput ec2.RunInstancesInput AttachVolumeInputs []ec2.AttachVolumeInput }
CreateInstanceRequest is the concrete provision request type.
type CreateSpotInstanceRequest ¶
type CreateSpotInstanceRequest struct { Tags map[string]string RequestSpotInstancesInput ec2.RequestSpotInstancesInput AttachVolumeInputs []ec2.AttachVolumeInput }
CreateSpotInstanceRequest is the concrete provision request type.
type ErrExceededAttempts ¶
type ErrExceededAttempts struct {
// contains filtered or unexported fields
}
ErrExceededAttempts is error when attempts have exceeded given threshold.
func (*ErrExceededAttempts) Error ¶
func (e *ErrExceededAttempts) Error() string
type ErrInvalidRequest ¶
type ErrInvalidRequest struct{}
ErrInvalidRequest is error for invalid request from the client.
func (*ErrInvalidRequest) Error ¶
func (e *ErrInvalidRequest) Error() string
type ErrUnexpectedResponse ¶
type ErrUnexpectedResponse struct{}
ErrUnexpectedResponse is error when the API call violates contract and has unexpected results.
func (*ErrUnexpectedResponse) Error ¶
func (e *ErrUnexpectedResponse) Error() string
type MetadataKey ¶
type MetadataKey string
MetadataKey is the identifier for a metadata entry.
func MetadataKeyFromSlice ¶
func MetadataKeyFromSlice(p []string) MetadataKey
MetadataKeyFromSlice returns a new metadata key with the given path, prefixed by the http://hostport/prefix
type Monitor ¶
type Monitor struct { // Plugin is the instance plugin to use Plugin instance.Plugin // contains filtered or unexported fields }
Monitor implements the event spi -- just just calls the Describe to get a list of known instances, and report anything it hasn't seen before, or if anything that disappeared.
Source Files ¶
- autoscaling_autoscalinggroup.go
- autoscaling_launchconfiguration.go
- builder.go
- cloudwatchlogs_loggroup.go
- dynamodb_table.go
- ec2_instance.go
- ec2_internetgateway.go
- ec2_routetable.go
- ec2_securitygroup.go
- ec2_spot_instance.go
- ec2_subnet.go
- ec2_volume.go
- ec2_vpc.go
- elb_loadbalancer.go
- error.go
- iam_instanceprofile.go
- iam_role.go
- metadata.go
- monitor.go
- sqs_queue.go
- util.go