aws

package
v0.0.0-...-a355528 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2017 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
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 CreateELBClient

func CreateELBClient(awsCredentials *credentials.Credentials, opt ELBOptions) elbiface.ELBAPI

CreateELBClient creates an AWS ELB API client.

func Credentials

func Credentials(cred *Credential) *credentials.Credentials

Credentials allocates a credential object that has the access key and secret id.

func GetMetadata

func GetMetadata(key MetadataKey) (string, error)

GetMetadata returns the value of the metadata by key

func GetRegion

func GetRegion() (string, error)

GetRegion returns the AWS region this instance is in.

func NewELBPlugin

func NewELBPlugin(client elbiface.ELBAPI, name string) (loadbalancer.L4, error)

NewELBPlugin creates an AWS-based ELB provisioner.

Types

type Credential

type Credential struct {
	AccessKeyID     string `yaml:"access_key_id" json:"access_key_id"`
	SecretAccessKey string `yaml:"secret_access_key" json:"secret_access_key"`
	SessionToken    string `yaml:"session_token" json:"session_token"`
}

Credential defines static authentication details (as opposed to environment-based) for the AWS API.

func (*Credential) IsExpired

func (a *Credential) IsExpired() bool

IsExpired implements the AWS credentials.Provider interface method. For static credentials this always returns false

func (*Credential) Retrieve

func (a *Credential) Retrieve() (credentials.Value, error)

Retrieve implements the AWS credentials.Provider interface method

type ELBOptions

type ELBOptions struct {
	Region  string
	Retries int
}

ELBOptions are the configuration parameters for the ELB provisioner.

type MetadataKey

type MetadataKey string

MetadataKey is the identifier for a metadata entry.

Jump to

Keyboard shortcuts

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