health

package
v0.0.0-...-a69e935 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2019 License: Apache-2.0 Imports: 6 Imported by: 32

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitHeartbeat

func InitHeartbeat(
	parent tally.Scope,
	config Config,
	candidate leader.Candidate)

InitHeartbeat inits heartbeat

Types

type Config

type Config struct {
	// Heartbeat interval
	HeartbeatInterval time.Duration `yaml:"heartbeat_interval"`
}

Config is the placeholder for health related configs

type Heartbeat

type Heartbeat interface {
	Start()
	Stop()
}

Heartbeat is the heartbeat interface

type Metrics

type Metrics struct {
	Init      tally.Counter
	Heartbeat tally.Gauge
	Leader    tally.Gauge
}

Metrics is a placeholder for all metrics in health package.

func NewMetrics

func NewMetrics(scope tally.Scope) *Metrics

NewMetrics returns a new instance of Metrics.

Jump to

Keyboard shortcuts

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