health

package
v0.0.14 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2019 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewTCPServer

func NewTCPServer(logger logrus.FieldLogger, provider metrics.Provider, cfg Config) cmdutil.Server

NewTCPServer returns a cmdutil.Server which emits a health metric whenever a TCP connection is opened on the configured port.

func NewTickingServer

func NewTickingServer(logger logrus.FieldLogger, provider metrics.Provider, cfg Config) cmdutil.Server

NewTickingServer returns a cmdutil.Server which emits a health metric every cfg.MetricInterval seconds.

Types

type Config

type Config struct {
	Port           int `env:"HEROKU_ROUTER_HEALTHCHECK_PORT,default=6000"`
	MetricInterval int `env:"HEROKU_HEALTH_METRIC_INTERVAL,default=5"`
}

Config can be used in a service's main config struct to load the healthcheck port from the environment.

Jump to

Keyboard shortcuts

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