1
0
mirror of https://github.com/go-micro/go-micro.git synced 2025-06-30 22:33:49 +02:00

Add debug stats handler

This commit is contained in:
Asim
2016-05-28 22:30:47 +01:00
parent 824d2a850c
commit 93c1ae6221
4 changed files with 97 additions and 19 deletions

@ -2,9 +2,6 @@ package server
import (
"github.com/micro/go-micro/server/debug"
proto "github.com/micro/go-micro/server/debug/proto"
"golang.org/x/net/context"
)
// We use this to wrap any debug handlers so we preserve the signature Debug.{Method}
@ -12,10 +9,6 @@ type Debug struct {
debug.DebugHandler
}
func (d *Debug) Health(ctx context.Context, req *proto.HealthRequest, rsp *proto.HealthResponse) error {
return d.DebugHandler.Health(ctx, req, rsp)
}
func registerDebugHandler(s Server) {
s.Handle(s.NewHandler(&Debug{s.Options().DebugHandler}, InternalHandler(true)))
}