1
0
mirror of https://github.com/go-micro/go-micro.git synced 2024-12-24 10:07:04 +02:00
go-micro/server/health_checker.go

18 lines
330 B
Go

package server
import (
"github.com/myodc/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{}))
}