azuremetadataclient

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func New

func New(config Config) (*Client, error)

func (*Client) AckEvent

func (am *Client) AckEvent(eventID string) error

func (*Client) FetchEvents

func (am *Client) FetchEvents() ([]ScheduledEvent, error)

func (*Client) GetInstanceMetadata

func (am *Client) GetInstanceMetadata() (*InstanceResponse, error)

type Compute

type Compute struct {
	Location             string `json:"location"`
	Name                 string `json:"name"`
	Offer                string `json:"offer"`
	OsType               string `json:"osType"`
	PlacementGroupID     string `json:"placementGroupId"`
	PlatformFaultDomain  string `json:"platformFaultDomain"`
	PlatformUpdateDomain string `json:"platformUpdateDomain"`
	Publisher            string `json:"publisher"`
	ResourceGroupName    string `json:"resourceGroupName"`
	Sku                  string `json:"sku"`
	SubscriptionID       string `json:"subscriptionId"`
	Tags                 string `json:"tags"`
	Version              string `json:"version"`
	VMID                 string `json:"vmId"`
	VMSize               string `json:"vmSize"`
}

type Config

type Config struct {
	// Optional http client to be used for HTTP requests.
	HttpClient *http.Client
	Logger     micrologger.Logger
}

type InstanceResponse

type InstanceResponse struct {
	Compute Compute `json:"compute"`
}

type ScheduledEvent

type ScheduledEvent struct {
	EventId      string   `json:"EventId"`
	EventType    string   `json:"EventType"`
	ResourceType string   `json:"ResourceType"`
	Resources    []string `json:"Resources"`
	EventStatus  string   `json:"EventStatus"`
	NotBefore    string   `json:"NotBefore"`
}

type ScheduledEventResponse

type ScheduledEventResponse struct {
	DocumentIncarnation int              `json:"DocumentIncarnation"`
	Events              []ScheduledEvent `json:"Events"`
}

Jump to

Keyboard shortcuts

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