micro/server/debug_handler.go
2015-12-01 19:13:48 +00:00

18 lines
330 B
Go

package server
import (
"github.com/micro/go-micro/server/proto/health"
"golang.org/x/net/context"
)
type Debug struct{}
func (d *Debug) Health(ctx context.Context, req *health.Request, rsp *health.Response) error {
rsp.Status = "ok"
return nil
}
func registerHealthChecker(s Server) {
s.Handle(s.NewHandler(&Debug{}))
}