heartbeat

package
v0.0.0-...-d20dd18 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 21, 2016 License: MIT Imports: 8 Imported by: 3

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

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

func (*Heartbeater) Stop

func (h *Heartbeater) Stop()

Stop requesting and listening to heartbeats

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL