ipmanager

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2022 License: BSD-2-Clause Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BasicConfigurer

type BasicConfigurer struct {
	*IPConfiguration
	// contains filtered or unexported fields
}

BasicConfigurer can be used to enable vip-management on nodes that handle their own network connection, in setups where it is sufficient to add the virtual ip using `ip addr add ...` . After adding the virtual ip to the specified interface, a gratuitous ARP package is sent out to update the tables of nearby routers and other devices.

type HetznerConfigurer

type HetznerConfigurer struct {
	*IPConfiguration
	// contains filtered or unexported fields
}

The HetznerConfigurer can be used to enable vip-management on nodes rented in a Hetzner Datacenter. Since Hetzner provides an API that handles failover-ip routing, this API is used to manage the vip, whenever hostintype `hetzner` is set.

type IPConfiguration

type IPConfiguration struct {
	VIP        net.IP
	Netmask    net.IPMask
	Iface      net.Interface
	RetryNum   int
	RetryAfter int
}

IPConfiguration holds the configuration for VIP manager

type IPManager

type IPManager struct {
	// contains filtered or unexported fields
}

IPManager implements the main functionality of the VIP manager

func NewIPManager

func NewIPManager(hostingType string, config *IPConfiguration, states <-chan bool, verbose bool) (m *IPManager, err error)

NewIPManager returns a new instance of IPManager

func (*IPManager) SyncStates

func (m *IPManager) SyncStates(ctx context.Context, states <-chan bool)

SyncStates implements states synchronization

Jump to

Keyboard shortcuts

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