health

package
v0.0.0-...-63e0d52 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2021 License: MIT Imports: 17 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InstrumentingMiddleware

func InstrumentingMiddleware(duration metrics.Histogram) endpoint.Middleware

InstrumentingMiddleware returns an endpoint middleware that records the duration of each invocation to the passed histogram. The middleware adds a single field: "success", which is "true" if no error is returned, and "false" otherwise.

func LoggingMiddleware

func LoggingMiddleware(logger log.Logger) endpoint.Middleware

LoggingMiddleware returns an endpoint middleware that logs the duration of each invocation, and the resulting error, if any.

func NewCheckEndpoint

func NewCheckEndpoint(f CheckHandler, logger log.Logger, duration metrics.Histogram, otTracer stdopentracing.Tracer, zipkinTracer *stdzipkin.Tracer) endpoint.Endpoint

func NewGRPCServer

func NewGRPCServer(checkEndpoint endpoint.Endpoint, otTracer stdopentracing.Tracer, zipkinTracer *stdzipkin.Tracer, logger log.Logger) proto.HealthServer

Types

type CheckHandler

type CheckHandler func(service string) CheckStatus

type CheckRequest

type CheckRequest struct {
	Service string
}

type CheckResponse

type CheckResponse struct {
	Status CheckStatus
}

type CheckStatus

type CheckStatus int
const (
	CheckStatusServing CheckStatus
	CheckStatusNotServing
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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