Run NodesReferenceService

health

Package health

import "github.com/luxfi/node/service/health"

Functions

NewGetAndPostHandler

func NewGetAndPostHandler(log log.Logger, reporter Reporter) (http.Handler, error)

NewGetAndPostHandler returns a health handler that supports GET and jsonrpc POST requests.

NewGetHandler

func NewGetHandler(reporter func(tags ...string) (map[string]apihealth.Result, bool)) http.Handler

NewGetHandler return a health handler that supports GET requests reporting the result of the provided [reporter].

Types

Checker

Checker can have its health checked

CheckerFunc

func (f CheckerFunc) HealthCheck(ctx context.Context) (interface{}, error)

Health

Health defines the full health service interface for registering, reporting and refreshing health checks.

func New(log log.Logger, registerer metric.Registerer) (Health, error)

Registerer

Registerer defines how to register new components to check the health of.

Reporter

Reporter returns the current health status.

Service

Service implements the health API with gorilla/rpc-compatible signatures.

func NewService(log log.Logger, reporter Reporter) *Service
func (s *Service) Health(_ *http.Request, args *apihealth.APIArgs, reply *apihealth.APIReply) error
func (s *Service) Liveness(_ *http.Request, args *apihealth.APIArgs, reply *apihealth.APIReply) error
func (s *Service) Readiness(_ *http.Request, args *apihealth.APIArgs, reply *apihealth.APIReply) error