Documentation
¶
Overview ¶
Package networklan is the lan network driver: a segment the nodes share, of which om hands out the addresses of the ranges it is given to the cluster rather than to a node, for an object to take its address along to the node it moves to, as the floating address of a failover service.
Nothing is set up on the nodes: the addresses are configured on an interface of the node on the segment, which is reached as the rest of the segment is, and leave it as they are, the hosts of the segment answering them directly.
Index ¶
- func NewNetworker() network.Networker
- type T
- func (t *T) AllocatableRange(_ string) (*net.IPNet, error)
- func (t *T) Gateway() (net.IP, error)
- func (t *T) HostDev() (string, error)
- func (t *T) IsClusterWide() bool
- func (t *T) Modes() []string
- func (t *T) Netmask() (int, error)
- func (t *T) Pools() ([]ipam.Pool, error)
- func (t *T) Setup() error
- func (t *T) VLAN() (tag, mode string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewNetworker ¶
Types ¶
type T ¶
func (*T) AllocatableRange ¶
AllocatableRange returns the segment, whatever the node: every node draws from the same ranges of it, so an object draws the same address wherever it runs.
func (*T) Gateway ¶
Gateway returns the router of the segment, the gateway keyword, nil when it is not set. It must be an address of the segment, and not one om hands out.
func (*T) HostDev ¶
HostDev returns the interface of this node on the segment: the dev keyword, or else the interface holding an address of the segment.
func (*T) IsClusterWide ¶
IsClusterWide says the addresses of a lan network belong to the cluster.
func (*T) Modes ¶
Modes returns the modes an ip.netns may join the segment with, the first being the one of an ip.netns naming none, which the modes keyword lists.
func (*T) Netmask ¶
Netmask returns the prefix length of the segment, which the addresses drawn from it are configured with.
func (*T) Pools ¶
Pools returns the ranges of the segment om hands out, which the ranges keyword lists. It is required: the segment holds the addresses of the nodes, of the router and of the other hosts, which om knows nothing of.