vm

package
v0.0.0-...-f06bd48 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2022 License: MPL-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewResourceDetector

func NewResourceDetector() resource.Detector

NewResourceDetector will return an implementation for aws ec2 resource detector

Types

type ComputeMetadata

type ComputeMetadata struct {
	Location          string `json:"location"`
	Name              string `json:"name"`
	VMID              string `json:"vmID"`
	VMSize            string `json:"vmSize"`
	SubscriptionID    string `json:"subscriptionID"`
	ResourceGroupName string `json:"resourceGroupName"`
	VMScaleSetName    string `json:"vmScaleSetName"`
}

ComputeMetadata is the Azure IMDS compute metadata response format

type Provider

type Provider interface {
	Metadata(context.Context) (*ComputeMetadata, error)
}

Provider gets metadata from the Azure IMDS

func NewProvider

func NewProvider() Provider

NewProvider creates a new metadata provider

type VM

type VM struct {
	// contains filtered or unexported fields
}

func (*VM) Detect

func (v *VM) Detect(ctx context.Context) (*resource.Resource, error)

Jump to

Keyboard shortcuts

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