Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Address ¶ added in v0.0.2
type Address struct { // DNSName is the DNS name of this NodeAddress, if known. Name string // IP is the IP address of this NodeAddress, if known. IP netaddr.IP // Port is the port number for this NodeAddress, if known. Port uint16 // LastReported indicates the time at which this address was last reported. LastReported time.Time }
Address describes an IP or DNS address with optional Port.
func (*Address) Endpoint ¶ added in v0.0.2
Endpoint returns a UDP endpoint address for the Address, using the defaultPort if none is known.
type Node ¶
type Node struct { // Name is the human-readable identifier of this Node. // Usually, this is the kubernetes Node name. // It *should* generally be unique, but it is not required to be so. Name string `json:"name,omitempty"` // ID is the unique identifier for this Node. // Usually, this is the Wireguard Public Key of the Node. ID string `json:"id,omitempty"` // IP is the IP address of the Wireguard interface on this Node. IP netaddr.IP `json:"ip,omitempty"` // Addresses is a list of addresses for the Node. Addresses []*Address `json:"selfIPs,omitempty"` // contains filtered or unexported fields }
Node describes a Wireguard Peer
func (*Node) AddAddresses ¶ added in v0.0.2
AddAddresses adds a set of addresses to a Node.
func (*Node) ExpireAddressesOlderThan ¶ added in v0.0.2
ExpireAddressesOlderThan removes addresses from the Node which have not been reported within the given timeframe.
Click to show internal directories.
Click to hide internal directories.