health

package
v0.0.0-...-c0686e8 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

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