mirror of
https://github.com/go-micro/go-micro.git
synced 2025-06-12 22:07:47 +02:00
Strip the verbosity of the debug handler
This commit is contained in:
@ -12,7 +12,7 @@ import (
|
||||
// used to determine health, status and env info about
|
||||
// a service node. It's akin to Google's /statusz, /healthz,
|
||||
// and /varz
|
||||
type DebugHandler interface {
|
||||
type Handler interface {
|
||||
Health(ctx context.Context, req *proto.HealthRequest, rsp *proto.HealthResponse) error
|
||||
Stats(ctx context.Context, req *proto.StatsRequest, rsp *proto.StatsResponse) error
|
||||
}
|
||||
@ -22,8 +22,13 @@ type debug struct {
|
||||
started int64
|
||||
}
|
||||
|
||||
// We use this to wrap any debug handlers so we preserve the signature Debug.{Method}
|
||||
type Debug struct {
|
||||
Handler
|
||||
}
|
||||
|
||||
var (
|
||||
DefaultDebugHandler DebugHandler = newDebug()
|
||||
DefaultHandler Handler = newDebug()
|
||||
)
|
||||
|
||||
func newDebug() *debug {
|
||||
|
Reference in New Issue
Block a user