networklan

package
v3.0.0-rc48 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

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

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewNetworker

func NewNetworker() network.Networker

Types

type T

type T struct {
	network.T
}

func New

func New() *T

func (*T) AllocatableRange

func (t *T) AllocatableRange(_ string) (*net.IPNet, error)

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

func (t *T) Gateway() (net.IP, error)

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

func (t *T) HostDev() (string, error)

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

func (t *T) IsClusterWide() bool

IsClusterWide says the addresses of a lan network belong to the cluster.

func (*T) Netmask

func (t *T) Netmask() (int, error)

Netmask returns the prefix length of the segment, which the addresses drawn from it are configured with.

func (*T) Pools

func (t *T) Pools() ([]ipam.Pool, error)

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.

func (*T) Setup

func (t *T) Setup() error

Setup checks the node is on the segment, and the ranges are, which is all a lan network needs of it.

Jump to

Keyboard shortcuts

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