imdsclient

package
v1.4.3 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ContainerVersion added in v1.0.4

type ContainerVersion struct {
	NetworkContainerID string
	ProgrammedVersion  string
}

InterfaceInfo specifies the information about an interface as returned by Host Agent.

type ImdsClient

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

ImdsClient can be used to connect to VM Host agent in Azure.

func (*ImdsClient) GetNetworkContainerInfoFromHost added in v1.0.4

func (imdsClient *ImdsClient) GetNetworkContainerInfoFromHost(networkContainerID string, primaryAddress string, authToken string, apiVersion string) (*ContainerVersion, error)

GetNetworkContainerInfoFromHost retrieves the programmed version of network container from Host.

func (*ImdsClient) GetNetworkContainerInfoFromHostWithoutToken added in v1.1.9

func (imdsClient *ImdsClient) GetNetworkContainerInfoFromHostWithoutToken() int

GetNetworkContainerInfoFromHostWithoutToken is a temp implementation which will be removed once background thread updating host version is ready. Return max integer value to regress current AKS scenario

func (*ImdsClient) GetPrimaryInterfaceInfoFromHost

func (imdsClient *ImdsClient) GetPrimaryInterfaceInfoFromHost() (*InterfaceInfo, error)

GetPrimaryInterfaceInfoFromHost retrieves subnet and gateway of primary NIC from Host.

func (*ImdsClient) GetPrimaryInterfaceInfoFromMemory

func (imdsClient *ImdsClient) GetPrimaryInterfaceInfoFromMemory() (*InterfaceInfo, error)

GetPrimaryInterfaceInfoFromMemory retrieves subnet and gateway of primary NIC that is saved in memory.

type ImdsClientInterface added in v1.1.8

type ImdsClientInterface interface {
	GetNetworkContainerInfoFromHost(networkContainerID string, primaryAddress string, authToken string, apiVersion string) (*ContainerVersion, error)
	GetPrimaryInterfaceInfoFromHost() (*InterfaceInfo, error)
	GetPrimaryInterfaceInfoFromMemory() (*InterfaceInfo, error)
	GetNetworkContainerInfoFromHostWithoutToken() int
}

An ImdsInterface performs CRUD operations on IP reservations

type InterfaceInfo

type InterfaceInfo struct {
	Subnet       string
	Gateway      string
	IsPrimary    bool
	PrimaryIP    string
	SecondaryIPs []string
}

InterfaceInfo specifies the information about an interface as returned by Host Agent.

Jump to

Keyboard shortcuts

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