2015-01-13 23:31:27 +00:00
|
|
|
package server
|
|
|
|
|
|
|
|
import (
|
2015-11-20 16:17:33 +00:00
|
|
|
"github.com/micro/go-micro/server/proto/health"
|
2015-05-21 23:06:01 +01:00
|
|
|
"golang.org/x/net/context"
|
2015-01-13 23:31:27 +00:00
|
|
|
)
|
|
|
|
|
2015-05-21 23:06:01 +01:00
|
|
|
type Debug struct{}
|
|
|
|
|
|
|
|
func (d *Debug) Health(ctx context.Context, req *health.Request, rsp *health.Response) error {
|
|
|
|
rsp.Status = "ok"
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2015-06-03 01:25:37 +01:00
|
|
|
func registerHealthChecker(s Server) {
|
|
|
|
s.Handle(s.NewHandler(&Debug{}))
|
2015-01-13 23:31:27 +00:00
|
|
|
}
|