Documentation ¶
Index ¶
- Constants
- type ConnectivityStatus
- func (cs *ConnectivityStatus) AnyGatewayDown() bool
- func (cs *ConnectivityStatus) Log() string
- func (cs *ConnectivityStatus) Logp() *string
- func (cs *ConnectivityStatus) NoConnectivity() bool
- func (cs *ConnectivityStatus) SetGatewayDown(name string)
- func (cs *ConnectivityStatus) SetGatewayUp(name string, family int)
- func (cs *ConnectivityStatus) SetNoConfig(family int)
- func (cs *ConnectivityStatus) Status() uint64
- func (cs *ConnectivityStatus) StatusMap() map[string]bool
- func (cs *ConnectivityStatus) ToString() string
Constants ¶
const ( IPv4Up = uint64(1 << iota) // FE has IPv4 external connectivity IPv6Up // FE has IPv6 external connectivity NoIPv4Config // No IPv4 Gateways configured NoIPv6Config // No IPv6 Gateways configured AnyGWDown // Not all configured gateways are available Up = IPv4Up | IPv6Up // FE has IPv4 and IPv6 external connectivity NoConfig = NoIPv4Config | NoIPv6Config // No Gateways configured at all )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConnectivityStatus ¶
type ConnectivityStatus struct {
// contains filtered or unexported fields
}
ConnectivityStatus - Keeps track a Frontend's external connectivity
func NewConnectivityStatus ¶
func NewConnectivityStatus() *ConnectivityStatus
func (*ConnectivityStatus) AnyGatewayDown ¶
func (cs *ConnectivityStatus) AnyGatewayDown() bool
AnyGatewayDown - Returns true if at least 1 gateway is down
func (*ConnectivityStatus) Log ¶
func (cs *ConnectivityStatus) Log() string
func (*ConnectivityStatus) Logp ¶
func (cs *ConnectivityStatus) Logp() *string
func (*ConnectivityStatus) NoConnectivity ¶
func (cs *ConnectivityStatus) NoConnectivity() bool
NoConnectivity - Returns external connectivity status based on the stored information Note: IPv4 and IPv6 ext connectivity are not handled separately, as Meridio NSM "backplane" currently neither is capable doing so. However if one IP version lacks configuration while the other have working gateway connectivity, then external connectivity is considered up.
func (*ConnectivityStatus) SetGatewayDown ¶
func (cs *ConnectivityStatus) SetGatewayDown(name string)
SetGatewayDown - Indicate that a gateway is down
func (*ConnectivityStatus) SetGatewayUp ¶
func (cs *ConnectivityStatus) SetGatewayUp(name string, family int)
SetGatewayUp - Indicate that a gateway is up Note: in case at least 1 configured gateway for an IP version is up, then external connectivity for respective IP version is considered up
func (*ConnectivityStatus) SetNoConfig ¶
func (cs *ConnectivityStatus) SetNoConfig(family int)
SetNoConfig - Indicate that IPv4/IPv6 has no configuration
func (*ConnectivityStatus) Status ¶
func (cs *ConnectivityStatus) Status() uint64
func (*ConnectivityStatus) StatusMap ¶
func (cs *ConnectivityStatus) StatusMap() map[string]bool
func (*ConnectivityStatus) ToString ¶ added in v1.0.12
func (cs *ConnectivityStatus) ToString() string
StatusToString - Returns a string representation of the connectivity status