metadata

package
v1.42.5 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthConfig

type AuthConfig struct {
	AuthMethod AuthMethod `json:"authMethod"`
	Username   string     `json:"username"`
	Password   string     `json:"password"`
	Token      string     `json:"token"`
}

type AuthMethod

type AuthMethod string
const (
	BasicAuth   AuthMethod = "BasicAuth"
	BearerToken AuthMethod = "BearerToken"
)

type Client

type Client interface {
	GetMachineMetadata() (*MachineMetadata, error)
}

func NewMetadataClient

func NewMetadataClient(cfg *Config) (Client, error)

type Config

type Config struct {
	Endpoint   string      `json:"endpoint,omitempty"`
	AuthConfig *AuthConfig `json:"authConfig,omitempty"`
}

type MachineMetadata

type MachineMetadata struct {
	CIDR       string `json:"cidr,omitempty"`
	MACAddress string `json:"mac_address,omitempty"`
	Gateway    string `json:"gateway,omitempty"`
	Status     string `json:"status,omitempty"`
}

Jump to

Keyboard shortcuts

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