equinixmetal

package
v1.0.0-beta.0 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2022 License: MPL-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// EquinixMetalUserDataEndpoint is the local metadata endpoint for Equinix.
	EquinixMetalUserDataEndpoint = "https://metadata.platformequinix.com/userdata"
	// EquinixMetalMetaDataEndpoint is the local endpoint for machine info like networking.
	EquinixMetalMetaDataEndpoint = "https://metadata.platformequinix.com/metadata"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Address

type Address struct {
	Public     bool   `json:"public"`
	Management bool   `json:"management"`
	Enabled    bool   `json:"enabled"`
	CIDR       int    `json:"cidr"`
	Family     int    `json:"address_family"`
	Netmask    string `json:"netmask"`
	Network    string `json:"network"`
	Address    string `json:"address"`
	Gateway    string `json:"gateway"`
}

Address holds address info from the equinixmetal metadata.

type Bonding

type Bonding struct {
	Mode int `json:"mode"`
}

Bonding holds bonding info from the equinixmetal metadata.

type EquinixMetal

type EquinixMetal struct{}

EquinixMetal is a platform for EquinixMetal Metal cloud.

func (*EquinixMetal) Configuration

func (p *EquinixMetal) Configuration(ctx context.Context) ([]byte, error)

Configuration implements the platform.Platform interface.

func (*EquinixMetal) KernelArgs

func (p *EquinixMetal) KernelArgs() procfs.Parameters

KernelArgs implements the runtime.Platform interface.

func (*EquinixMetal) Mode

func (p *EquinixMetal) Mode() runtime.Mode

Mode implements the platform.Platform interface.

func (*EquinixMetal) Name

func (p *EquinixMetal) Name() string

Name implements the platform.Platform interface.

func (*EquinixMetal) NetworkConfiguration

func (p *EquinixMetal) NetworkConfiguration(ctx context.Context, ch chan<- *runtime.PlatformNetworkConfig) error

NetworkConfiguration implements the runtime.Platform interface.

func (*EquinixMetal) ParseMetadata

func (p *EquinixMetal) ParseMetadata(equinixMetadata *Metadata) (*runtime.PlatformNetworkConfig, error)

ParseMetadata converts Equinix Metal metadata into Talos network configuration.

type Interface

type Interface struct {
	Name string `json:"name"`
	MAC  string `json:"mac"`
	Bond string `json:"bond"`
}

Interface holds interface info from the equinixmetal metadata.

type Metadata

type Metadata struct {
	Hostname       string   `json:"hostname"`
	Network        Network  `json:"network"`
	PrivateSubnets []string `json:"private_subnets"`
}

Metadata holds equinixmetal metadata info.

type Network

type Network struct {
	Bonding    Bonding     `json:"bonding"`
	Interfaces []Interface `json:"interfaces"`
	Addresses  []Address   `json:"addresses"`
}

Network holds network info from the equinixmetal metadata.

Jump to

Keyboard shortcuts

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