Documentation ¶
Index ¶
- type Failover
- func (f *Failover) AddIPOnVLANInterface(interfaceType InterfaceType) error
- func (f *Failover) LinkMonitor() error
- func (f *Failover) LinkUp(interfaceType InterfaceType) bool
- func (f *Failover) Prober() error
- func (f *Failover) RemoveIPFromVLANInterface(interfaceType InterfaceType) error
- func (f *Failover) RemoveVLANInterface(interfaceType InterfaceType) error
- func (f *Failover) SendArp() bool
- func (f *Failover) Setup()
- func (f *Failover) SetupVLANInterface(interfaceType InterfaceType) error
- type InterfaceType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Failover ¶
type Failover struct { PrimaryInterface string SecondaryInterface string VLANID int IP netip.Prefix ArpTarget netip.Addr StandbyVLANMode bool ArpInterval int // ArpInterval in ms. ArpTimeout int // ArpTimeout in ms. LinkMonitorInterval int // LinkMonitorInterval in ms. // contains filtered or unexported fields }
func (*Failover) AddIPOnVLANInterface ¶
func (f *Failover) AddIPOnVLANInterface(interfaceType InterfaceType) error
AddIPOnVLANInterface adds the IP address to the specified interface.
func (*Failover) LinkMonitor ¶
LinkMonitor runs the failover mechanism.
func (*Failover) LinkUp ¶
func (f *Failover) LinkUp(interfaceType InterfaceType) bool
LinkUp reports if the current interface is up.
func (*Failover) RemoveIPFromVLANInterface ¶
func (f *Failover) RemoveIPFromVLANInterface(interfaceType InterfaceType) error
RemoveIPFromVLANInterface removes the IP address from the specified interface.
func (*Failover) RemoveVLANInterface ¶
func (f *Failover) RemoveVLANInterface(interfaceType InterfaceType) error
RemoveVLANInterface returns the VLAN interface on the selected interface if it exists.
func (*Failover) SendArp ¶
SendArp sends an ARP packet and reports if a reply was received - it blocks until it receives the answer.
func (*Failover) SetupVLANInterface ¶
func (f *Failover) SetupVLANInterface(interfaceType InterfaceType) error
SetupVLANInterface creates the VLAN interface on top of the selected interface.
type InterfaceType ¶
type InterfaceType bool
const ( InterfacePrimary InterfaceType = true InterfaceSecondary InterfaceType = false )
Click to show internal directories.
Click to hide internal directories.