health

package
v1.9.2 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2021 License: MIT Imports: 10 Imported by: 3

Documentation

Index

Constants

View Source
const (
	// ID declares public service name.
	ID = "health"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// Address to listen on
	Address string
}

Config configures the health service

func (*Config) Hydrate

func (c *Config) Hydrate(cfg service.Config) error

Hydrate the config

func (*Config) Valid

func (c *Config) Valid() error

Valid validates the configuration.

type Service

type Service struct {
	// contains filtered or unexported fields
}

Service to serve an endpoint for checking the health of the worker pool

func (*Service) Init

func (s *Service) Init(cfg *Config, r *rrhttp.Service, log *logrus.Logger) (bool, error)

Init health service

func (*Service) Serve

func (s *Service) Serve() error

Serve the health endpoint

func (*Service) ServeHTTP

func (s *Service) ServeHTTP(w http.ResponseWriter, r *http.Request)

ServeHTTP returns the health of the pool of workers

func (*Service) Stop

func (s *Service) Stop()

Stop the health endpoint

Jump to

Keyboard shortcuts

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