kratos icon indicating copy to clipboard operation
kratos copied to clipboard

health: Health check API

Open tonybase opened this issue 3 years ago • 0 comments

implement is based on gRPC health check API: https://github.com/grpc/grpc/blob/master/src/proto/grpc/health/v1/health.proto

Health Status:

  • UNKNOWN
  • SERVING
  • NOT_SERVING
  • SERVICE_UNKNOWN

There should be a health package in kratos for HTTP/gRPC health check, the status should be set to NOT_SERVING on application exit.

type Health interface {
    SetStatus(ServingStatus)
}

health check API in HTTP:

GET /health/check?service=

{
    "status": "SERVING",
}

tonybase avatar Oct 27 '21 15:10 tonybase