imdsclient

package
v1.0.7 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2018 License: MIT Imports: 6 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) 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 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