azure

package
v44.23.4 Latest Latest
Warning

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

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

Documentation

Overview

This package reads from the Azure metadata service; see https://docs.microsoft.com/en-us/azure/virtual-machines/windows/instance-metadata-service#custom-data

Index

Constants

This section is empty.

Variables

View Source
var MetadataBaseURL = "http://169.254.169.254"

Functions

func New

func New(runnercfg *cfg.RunnerConfig) (provider.Provider, error)

func Usage

func Usage() string

Types

type AttestedDocument

type AttestedDocument struct {
	Encoding  string `json:"encoding"`
	Signature string `json:"signature"`
}

Data from the /attested/document endpoint.

type AzureProvider

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

func (*AzureProvider) ConfigureRun

func (p *AzureProvider) ConfigureRun(state *run.State) error

func (*AzureProvider) GetWorkerIdentityProof

func (p *AzureProvider) GetWorkerIdentityProof() (map[string]interface{}, error)

func (*AzureProvider) SetProtocol

func (p *AzureProvider) SetProtocol(proto *workerproto.Protocol)

func (*AzureProvider) UseCachedRun

func (p *AzureProvider) UseCachedRun(run *run.State) error

func (*AzureProvider) WorkerFinished

func (p *AzureProvider) WorkerFinished(state *run.State) error

func (*AzureProvider) WorkerStarted

func (p *AzureProvider) WorkerStarted(state *run.State) error

type CustomData

type CustomData struct {
	WorkerPoolId         string           `json:"workerPoolId"`
	ProviderId           string           `json:"providerId"`
	RootURL              string           `json:"rootUrl"`
	WorkerGroup          string           `json:"workerGroup"`
	ProviderWorkerConfig *json.RawMessage `json:"workerConfig"`
}

type InstanceData

type InstanceData struct {
	Compute struct {
		Location string `json:"location"`
		Name     string `json:"name"`
		VMID     string `json:"vmId"`
		VMSize   string `json:"vmSize"`
		TagsList []Tag  `json:"tagsList"`
	} `json:"compute"`
	Network struct {
		Interface []struct {
			IPV4 struct {
				IPAddress []struct {
					PrivateIPAddress string `json:"privateIpAddress"`
					PublicIPAddress  string `json:"publicIpAddress"`
				} `json:"ipAddress"`
			} `json:"ipv4"`
		} `json:"interface"`
	} `json:"network"`
}

Data from the `/instance` endpoint. Note that this is a partial set -- feel free to add additional fields here as necessary.

type MetadataService

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

type ScheduledEvents

type ScheduledEvents struct {
	Events []struct {
		EventId      string
		EventType    string
		ResourceType string
		Resources    []string
		EventStatus  string
		NotBefore    string
	}
}

Data from the /scheduledevents endpoint

type Tag

type Tag struct {
	Name  string `json:"name"`
	Value string `json:"value"`
}

Convenience object for Azure tags

type TaggedData

type TaggedData struct {
	WorkerPoolId string
	ProviderId   string
	RootURL      string
	WorkerGroup  string
}

These values are expected to be set in tags on the VM by the provider

Jump to

Keyboard shortcuts

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