Files
ark/server/internal/interface/grpc/handlers/healthservice.go
Pietralberto Mazza f9e7621165 Add grpc-gateway and /healthz endpoint (#133)
* Add grpc-gateway and /healthz endpoint

* Add nolint

* nosec
2024-04-19 17:11:59 +02:00

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
}