aws

package
v0.14.2 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2022 License: MPL-2.0 Imports: 14 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 runtime.Platform interface.

func (*AWS) Configuration

func (a *AWS) Configuration(ctx context.Context) ([]byte, error)

Configuration implements the runtime.Platform interface.

func (*AWS) ExternalIPs

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

ExternalIPs implements the runtime.Platform interface.

func (*AWS) Hostname

func (a *AWS) Hostname(ctx context.Context) (hostname []byte, err error)

Hostname implements the runtime.Platform interface.

func (*AWS) KernelArgs

func (a *AWS) KernelArgs() procfs.Parameters

KernelArgs implements the runtime.Platform interface.

func (*AWS) Mode

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

Mode implements the runtime.Platform interface.

func (*AWS) Name

func (a *AWS) Name() string

Name implements the runtime.Platform interface.

Jump to

Keyboard shortcuts

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