ec2infradetect

package
v0.0.0-...-da9a336 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2024 License: Apache-2.0 Imports: 1 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CollectEc2Infrastructure = func(identity identity.IAgentIdentity) (*Ec2Infrastructure, error) {

	instanceID, _ := identity.InstanceID()
	instanceType, _ := identity.InstanceType()
	region, _ := identity.Region()
	availabilityZone, _ := identity.AvailabilityZone()

	e := &Ec2Infrastructure{
		InstanceID:       instanceID,
		Region:           region,
		AvailabilityZone: availabilityZone,
		InstanceType:     instanceType,
	}
	return e, nil
}

CollectEc2Infrastructure queries Ec2 metadata service for infrastructure information

Functions

This section is empty.

Types

type Ec2Infrastructure

type Ec2Infrastructure struct {
	InstanceID       string
	Region           string
	AccountID        string
	AvailabilityZone string
	InstanceType     string
}

Ec2Infrastructure contains information about instance, region and account queried from Ec2 metadata service

Jump to

Keyboard shortcuts

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