mirror of
https://github.com/aljazceru/ark.git
synced 2025-12-17 12:14:21 +01:00
30 lines
565 B
Go
30 lines
565 B
Go
package handlers
|
|
|
|
import (
|
|
"context"
|
|
|
|
grpchealth "google.golang.org/grpc/health/grpc_health_v1"
|
|
)
|
|
|
|
type healthHandler struct{}
|
|
|
|
func NewHealthHandler() grpchealth.HealthServer {
|
|
return &healthHandler{}
|
|
}
|
|
|
|
func (h *healthHandler) Check(
|
|
_ context.Context,
|
|
_ *grpchealth.HealthCheckRequest,
|
|
) (*grpchealth.HealthCheckResponse, error) {
|
|
return &grpchealth.HealthCheckResponse{
|
|
Status: grpchealth.HealthCheckResponse_SERVING,
|
|
}, nil
|
|
}
|
|
|
|
func (h *healthHandler) Watch(
|
|
_ *grpchealth.HealthCheckRequest,
|
|
_ grpchealth.Health_WatchServer,
|
|
) error {
|
|
return nil
|
|
}
|