metadata

package
v0.0.10 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2021 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EC2MetadataAPI

type EC2MetadataAPI interface {
	GetInstanceIdentityDocument() (ec2metadata.EC2InstanceIdentityDocument, error)
}

EC2MetadataAPI defines a missing interface from the AWS SDK

type Metadata

type Metadata struct {
	Metadata EC2MetadataAPI
}

Metadata type is the AWS EC2 metadata API facade

func New

func New(session client.ConfigProvider) *Metadata

New creates a new Metadata

func (*Metadata) GetCurrentInstanceIDAndRegion

func (m *Metadata) GetCurrentInstanceIDAndRegion() (string, string, error)

GetCurrentInstanceIDAndRegion uses EC2 Metadata to get current EC2 instance ID and AWS Region

Jump to

Keyboard shortcuts

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