node

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2017 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteNode

func DeleteNode(ni Identity)

DeleteNode remove the node from the nodes' maps.

func UpdateNode

func UpdateNode(ni Identity, n *Node)

UpdateNode updates the new node in the nodes' map with the given identity.

Types

type Address

type Address struct {
	AddressType v1.NodeAddressType
	IP          net.IP
}

Address is a node address which contains an IP and the address type.

type Identity

type Identity struct {
	Name string
}

Identity represents the node identity of a node.

func (Identity) String

func (nn Identity) String() string

String returns the string representation on NodeIdentity.

type Node

type Node struct {
	Name        string
	IPAddresses []Address

	// IPv4AllocCIDR if set, is the IPv4 address pool out of which the node
	// allocates IPs for local endpoints from
	IPv4AllocCIDR *net.IPNet

	// IPv6AllocCIDR if set, is the IPv6 address pool out of which the node
	// allocates IPs for local endpoints from
	IPv6AllocCIDR *net.IPNet
}

Node contains the nodes name, the list of addresses to this address

func GetNode

func GetNode(ni Identity) *Node

GetNode returns the node with the given identity, if exists, from the nodes map.

func (*Node) GetNodeIP

func (n *Node) GetNodeIP(ipv6 bool) net.IP

GetNodeIP returns one of the node's IP addresses available with the following priority: - NodeInternalIP - NodeExternalIP - other IP address type

Jump to

Keyboard shortcuts

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