Documentation ¶
Index ¶
- func InstrumentingMiddleware(duration metrics.Histogram) endpoint.Middleware
- func LoggingMiddleware(logger log.Logger) endpoint.Middleware
- func NewCheckEndpoint(f CheckHandler, logger log.Logger, duration metrics.Histogram, ...) endpoint.Endpoint
- func NewGRPCServer(checkEndpoint endpoint.Endpoint, otTracer stdopentracing.Tracer, ...) proto.HealthServer
- type CheckHandler
- type CheckRequest
- type CheckResponse
- type CheckStatus
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 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 )
Click to show internal directories.
Click to hide internal directories.