Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DummyGREProbe ¶
type DummyGREProbe struct{}
func (*DummyGREProbe) GetStatus ¶
func (d *DummyGREProbe) GetStatus() *GREProbeStatus
func (*DummyGREProbe) Start ¶
func (d *DummyGREProbe) Start() error
type GREEndpointStatus ¶
type GREEndpointStatus uint
const ( EndpointReachable GREEndpointStatus = 0 EndpointUnreachable GREEndpointStatus = 1 )
type GREProbe ¶
type GREProbe interface { // Start begins the probe of the GRE endpoint(s). Start() error // Stop stops the probe of the GRE endpoint(s). Stop() // GetStatus fetches the status of the GRE probe. The GREProbeStatus // returned contains slices of reachable and unreachable endpoint IPs. GetStatus() *GREProbeStatus }
GREProbe defines an interface to begin a probe of GRE endpoints and fetch that status at a later point.
type GREProbeStatus ¶
type ICMPProbe ¶
type ICMPProbe struct { Endpoints []*mconfig.CwfGatewayHealthConfigGrePeer Interval time.Duration PktCount int sync.RWMutex // R/W lock synchronizing map endpoint status access // contains filtered or unexported fields }
ICMPProbe implements the GRE probe interface using ICMP over GRE.
func NewICMPProbe ¶
func NewICMPProbe(endpoints []*mconfig.CwfGatewayHealthConfigGrePeer, interval uint32, pktCount int) *ICMPProbe
NewICMPProbe create a new ICMPProbe with the provided endpoints and probe interval.
func (*ICMPProbe) GetStatus ¶
func (i *ICMPProbe) GetStatus() *GREProbeStatus
GetStatus returns the current GREEndpointStatus of each endpoint.
Click to show internal directories.
Click to hide internal directories.