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
Raw Normal View History

2015-01-14 01:31:27 +02:00
package server
import (
"github.com/myodc/go-micro/server/proto/health"
2015-05-22 00:06:01 +02:00
"golang.org/x/net/context"
2015-01-14 01:31:27 +02:00
)
2015-05-22 00:06:01 +02:00
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{}))
2015-01-14 01:31:27 +02:00
}