Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client defines the client for interacting with the Amazon EC2 Instance Metadata Service (IMDS)
func NewFromAPI ¶
func NewFromAPI(api MetadataClientAPI) *Client
NewFromAPI returns a new client from the provided IMDS API implementation
type Metadata ¶
type Metadata struct { // IPv4 is the private IPv4 address of the launched instance IPv4 string // Region of where the EC2 instance was launched Region string // VPC ID of where the EC2 instance was launched VPC string // AZ is the availability zone where the instance was launched AZ string // InstanceID is the unique ID of this instance InstanceID string }
Metadata contains metadata associated with an EC2 instance
type MetadataClientAPI ¶
type MetadataClientAPI interface { // GetMetadata uses the path provided to request information from the Amazon // EC2 Instance Metadata Service GetMetadata(ctx context.Context, params *awsimds.GetMetadataInput, optFns ...func(*awsimds.Options)) (*awsimds.GetMetadataOutput, error) }
MetadataClientAPI defines the API for interacting with the Amazon EC2 Instance Metadata Service (IMDS)
Click to show internal directories.
Click to hide internal directories.