Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Run ¶
func Run( every time.Duration, h Hearbeater, lastHeartbeatAck *atomic.Int64, lastHeartbeatSent *atomic.Int64, stop chan struct{}, errReporter func(err error), )
Run periodically calls the given heartbeater to send a heartbeat payload. It can be stopped by closing the stop channel and will report any error that occurs using the given errReporter.
func RunUDP ¶
func RunUDP( every time.Duration, h Hearbeater, lastUDPHeartbeatAck *atomic.Int64, lastUDPHeartbeatSent *atomic.Int64, stop chan struct{}, errReporter func(err error), )
RunUDP periodically calls the given heartbeater to send a heartbeat packet. It can be stopped by closing the stop channel and will report any error that occurs using the given errReporter.
Types ¶
Click to show internal directories.
Click to hide internal directories.