packet

package
v0.13.4 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2021 License: MPL-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

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

Variables

This section is empty.

Functions

This section is empty.

Types

type Address added in v0.8.0

type Address struct {
	Public  bool   `json:"public"`
	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 packet metadata.

type Bonding added in v0.8.0

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

Bonding holds bonding info from the packet metadata.

type Interface added in v0.8.0

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

Interface holds interface info from the packet metadata.

type Metadata added in v0.8.0

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

Metadata holds packet metadata info.

type Network added in v0.8.0

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

Network holds network info from the packet metadata.

type Packet

type Packet struct{}

Packet is a discoverer for non-cloud environments.

func (*Packet) Configuration

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

Configuration implements the platform.Platform interface.

func (*Packet) ExternalIPs

func (p *Packet) ExternalIPs(context.Context) (addrs []net.IP, err error)

ExternalIPs implements the runtime.Platform interface.

func (*Packet) Hostname

func (p *Packet) Hostname(ctx context.Context) (hostname []byte, err error)

Hostname implements the platform.Platform interface.

func (*Packet) KernelArgs

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

KernelArgs implements the runtime.Platform interface.

func (*Packet) Mode

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

Mode implements the platform.Platform interface.

func (*Packet) Name

func (p *Packet) Name() string

Name implements the platform.Platform interface.

Jump to

Keyboard shortcuts

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