Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CWAGSystemHealthProvider ¶
type CWAGSystemHealthProvider struct {
// contains filtered or unexported fields
}
CWAGSystemHealthProvider defines a system health provider.
func NewCWAGSystemHealthProvider ¶
func NewCWAGSystemHealthProvider(eth string) (*CWAGSystemHealthProvider, error)
NewCWAGSystemHealthProvider creates a new CWAGSystemHealthProvider with initialized iptables.
func (*CWAGSystemHealthProvider) Disable ¶
func (c *CWAGSystemHealthProvider) Disable() error
Disable adds an ICMP DROP rule from iptables for the configured interface. If the iptables rule already exists, Disable has no effect.
func (*CWAGSystemHealthProvider) Enable ¶
func (c *CWAGSystemHealthProvider) Enable() error
Enable removes the ICMP DROP rule from iptables for the configured interface. If the iptables rule doesn't exist, Enable has no effect.
func (*CWAGSystemHealthProvider) GetSystemStats ¶
func (c *CWAGSystemHealthProvider) GetSystemStats() (*SystemStats, error)
GetSystemStats collects and return the stats defined in SystemStats.
type SystemHealth ¶
type SystemHealth interface { // GetSystemStats provides system level health stats GetSystemStats() (*SystemStats, error) // Disable allows the disabling of system level functionality. It is // up to implementors to determine specific functionality. Disable() error // Enable allows the enabling of system level functionality. It is // up to implementors to determine specific functionality. Enable() error }
SystemHealth defines an interface to fetch system health and enable/disable functionality necessary for promotion/demotion from failovers
type SystemStats ¶
SystemsStats define the metrics this provider will collect.