github.com/dean7474/operator-registry@v1.21.1-0.20220418203638-d4717f98c2e5/pkg/server/health.go (about) 1 package server 2 3 import ( 4 "context" 5 6 health "github.com/operator-framework/operator-registry/pkg/api/grpc_health_v1" 7 ) 8 9 type HealthServer struct { 10 health.UnimplementedHealthServer 11 } 12 13 var _ health.HealthServer = &HealthServer{} 14 15 func NewHealthServer() *HealthServer { 16 return &HealthServer{health.UnimplementedHealthServer{}} 17 } 18 19 func (s *HealthServer) Check(ctx context.Context, req *health.HealthCheckRequest) (*health.HealthCheckResponse, error) { 20 return &health.HealthCheckResponse{Status: health.HealthCheckResponse_SERVING}, nil 21 }