types

package
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2025 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// PublicNamespace is the name of the public namespace of a node
	// the public namespace is currently unique for a node so we hardcode its name
	PublicNamespace = "public"
	// PublicIface is the name of the interface we create in the public namespace
	PublicIface = "public"
	// GatewayNamespace is the name of the gateway namespace of a node
	GatewayNamespace = "gateway"
	// DefaultBridge is the name of the default bridge created
	// by the bootstrap of networkd
	DefaultBridge = "zos"
	// PublicBridge name
	PublicBridge = "br-pub"
	// YggBridge ygg bridge
	YggBridge = "br-ygg"
	// MyceliumBridge mycelium bridge
	MyceliumBridge = "br-my"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type IfaceInfo

type IfaceInfo struct {
	Name       string            `json:"name"`
	Addrs      []gridtypes.IPNet `json:"addrs"`
	Gateway    []net.IP          `json:"gateway"`
	MacAddress MacAddress        `json:"macaddress"`
}

IfaceInfo is the information about network interfaces that the node will publish publicly this is used to be able to configure public side of a node

func (*IfaceInfo) DefaultIP

func (i *IfaceInfo) DefaultIP() (net.IP, error)

DefaultIP return the IP address of the interface that has a default gateway configured this function currently only check IPv6 addresses

type MacAddress

type MacAddress struct{ net.HardwareAddr }

MacAddress type

func (MacAddress) MarshalText

func (mac MacAddress) MarshalText() ([]byte, error)

MarshalText marshals MacAddress type to a string

func (*MacAddress) UnmarshalText

func (mac *MacAddress) UnmarshalText(addr []byte) error

UnmarshalText loads a macaddress from a string

Jump to

Keyboard shortcuts

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