azure

package
v0.37.0 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// TypeStr is type of detector.
	TypeStr = "azure"
)

Variables

This section is empty.

Functions

func NewDetector

NewDetector creates a new Azure metadata detector

Types

type ComputeMetadata added in v0.25.0

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 Detector

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

Detector is an Azure metadata detector

func (*Detector) Detect

func (d *Detector) Detect(ctx context.Context) (resource pdata.Resource, schemaURL string, err error)

Detect detects system metadata and returns a resource with the available ones

type MockProvider added in v0.25.0

type MockProvider struct {
	mock.Mock
}

func (*MockProvider) Metadata added in v0.25.0

func (m *MockProvider) Metadata(_ context.Context) (*ComputeMetadata, error)

type Provider added in v0.25.0

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

Provider gets metadata from the Azure IMDS

func NewProvider added in v0.25.0

func NewProvider() Provider

NewProvider creates a new metadata provider

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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