Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var GossipNewsExpirationTime = time.Second * 10
Functions ¶
This section is empty.
Types ¶
type Heartbeater ¶
type Heartbeater struct { Sleep time.Duration SleepOnFail time.Duration Timeout time.Duration TimeoutRetries time.Duration // contains filtered or unexported fields }
Heartbeater is used to discover changes in the DB topology by using a ping-pong protocol Exported fields are used to configure various parameters
func Start ¶
func Start(sg *servergroup.ServerGroup) *Heartbeater
Start a new heartbeater in the background and introduce the changes into sg It blocks until the first heartbeat of each server is served
func (*Heartbeater) GossipAdded ¶
func (h *Heartbeater) GossipAdded(addr string)
func (*Heartbeater) GossipDead ¶
func (h *Heartbeater) GossipDead(addr string)
func (*Heartbeater) ListenReply ¶
func (h *Heartbeater) ListenReply(c *core.Core) func() protocol.AmAlive
ListenReply starts listening and repling to UDP heartbeat requests
Click to show internal directories.
Click to hide internal directories.