Documentation ¶
Index ¶
Constants ¶
View Source
const ( IPv4 = AddressFamily(4) IPv6 = AddressFamily(6) )
View Source
const ( BondingBalanceRR = BondingMode(0) BondingActiveBackup = BondingMode(1) BondingBalanceXOR = BondingMode(2) BondingBroadcast = BondingMode(3) BondingLACP = BondingMode(4) BondingBalanceTLB = BondingMode(5) BondingBalanceALB = BondingMode(6) )
View Source
const BaseURL = "https://metadata.packet.net"
Variables ¶
This section is empty.
Functions ¶
func GetUserData ¶
Types ¶
type AddressFamily ¶
type AddressFamily int
type AddressInfo ¶
type BondingMode ¶
type BondingMode int
func (BondingMode) String ¶
func (m BondingMode) String() string
type CurrentDevice ¶
type CurrentDevice struct { ID string `json:"id"` Hostname string `json:"hostname"` IQN string `json:"iqn"` Plan string `json:"plan"` Facility string `json:"facility"` Tags []string `json:"tags"` SSHKeys []string `json:"ssh_keys"` OS OperatingSystem `json:"operating_system"` Network NetworkInfo `json:"network"` Volumes []VolumeInfo `json:"volume"` }
func GetMetadata ¶
func GetMetadata() (*CurrentDevice, error)
type InterfaceInfo ¶
func (*InterfaceInfo) ParseMAC ¶
func (i *InterfaceInfo) ParseMAC() (net.HardwareAddr, error)
type NetworkInfo ¶
type NetworkInfo struct { Interfaces []InterfaceInfo `json:"interfaces"` Addresses []AddressInfo `json:"addresses"` Bonding struct { Mode BondingMode `json:"mode"` } `json:"bonding"` }
func (*NetworkInfo) BondingMode ¶
func (n *NetworkInfo) BondingMode() BondingMode
type OperatingSystem ¶
Click to show internal directories.
Click to hide internal directories.