ec2

package module
v1.11.1 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2022 License: Apache-2.0 Imports: 9 Imported by: 9

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewResourceDetector

func NewResourceDetector(opts ...Option) resource.Detector

NewResourceDetector returns a resource detector that will detect AWS EC2 resources.

func SemVersion added in v0.24.0

func SemVersion() string

SemVersion is the semantic version to be supplied to tracer/meter creation.

func Version added in v0.24.0

func Version() string

Version is the current release version of the EC2 resource detector.

Types

type Client

type Client interface {
	Available() bool
	GetInstanceIdentityDocument() (ec2metadata.EC2InstanceIdentityDocument, error)
	GetMetadata(p string) (string, error)
}

Client implements methods to capture EC2 environment metadata information.

type Option

type Option interface {
	// contains filtered or unexported methods
}

Option applies an EC2 detector configuration option.

func WithClient

func WithClient(t Client) Option

WithClient sets the ec2metadata client in config.

Jump to

Keyboard shortcuts

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