aws

package
v0.3.0-alpha.2 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2019 License: MPL-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// AWSExternalIPEndpoint displays all external addresses associated with the instance
	AWSExternalIPEndpoint = "http://169.254.169.254/latest/meta-data/public-ipv4"
	// AWSHostnameEndpoint is the local EC2 endpoint for the hostname.
	AWSHostnameEndpoint = "http://169.254.169.254/latest/meta-data/hostname"
	// AWSPKCS7Endpoint is the local EC2 endpoint for the PKCS7 signature.
	AWSPKCS7Endpoint = "http://169.254.169.254/latest/dynamic/instance-identity/pkcs7"
	// AWSPublicCertificate is the AWS public certificate for the regions
	// provided by an AWS account.
	AWSPublicCertificate = `` /* 1073-byte string literal not displayed */

	// AWSUserDataEndpoint is the local EC2 endpoint for the config.
	AWSUserDataEndpoint = "http://169.254.169.254/latest/user-data"
)

Variables

This section is empty.

Functions

func IsEC2

func IsEC2() (b bool)

IsEC2 uses the EC2 PKCS7 signature to verify the instance by validating it against the appropriate AWS public certificate. See https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-identity-documents.html

Types

type AWS

type AWS struct{}

AWS is the concrete type that implements the platform.Platform interface.

func (*AWS) Configuration

func (a *AWS) Configuration() ([]byte, error)

Configuration implements the platform.Platform interface.

func (*AWS) ExternalIPs

func (a *AWS) ExternalIPs() (addrs []net.IP, err error)

ExternalIPs provides any external addresses assigned to the instance

func (*AWS) Hostname

func (a *AWS) Hostname() (hostname []byte, err error)

Hostname gets the hostname from the AWS metadata endpoint.

func (*AWS) Mode

func (a *AWS) Mode() runtime.Mode

Mode implements the platform.Platform interface.

func (*AWS) Name

func (a *AWS) Name() string

Name implements the platform.Platform interface.

Jump to

Keyboard shortcuts

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