ec2metadatawrapper

package
v1.12.1-rc3 Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package ec2metadatawrapper is used to retrieve data from EC2 IMDS

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EC2MetadataClient

type EC2MetadataClient interface {
	GetInstanceIdentityDocument() (ec2metadata.EC2InstanceIdentityDocument, error)
	Region() (string, error)
}

EC2MetadataClient to used to obtain a subset of information from EC2 IMDS

func New

func New(session *session.Session) EC2MetadataClient

New creates an ec2metadata client to retrieve metadata

func NewMetadataService added in v1.8.0

func NewMetadataService(metadata HTTPClient) EC2MetadataClient

NewMetadataService creates an ec2metadata client to retrieve metadata

type HTTPClient added in v1.7.2

type HTTPClient interface {
	GetInstanceIdentityDocument() (ec2metadata.EC2InstanceIdentityDocument, error)
	Region() (string, error)
}

HTTPClient is used to help with testing

Directories

Path Synopsis
Package mock_ec2metadatawrapper is a generated GoMock package.
Package mock_ec2metadatawrapper is a generated GoMock package.

Jump to

Keyboard shortcuts

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