// Check() and Watch() are for gRPC healthcheck protocols.
// currently it always returns healthy status.
Check() and Watch() are for gRPC healthcheck protocols.
currently it always returns healthy status.
// Check () and Watch () are for gRPC healthcheck protocols . // currently it always returns healthy status .
func (s *hserver) Check(ctx context.Context, in *healthpb.HealthCheckRequest) (*healthpb.HealthCheckResponse, error) {
	s.mu.Lock()
	defer s.mu.Unlock()
	if in.Service == "" {
		return &healthpb.HealthCheckResponse{Status: healthpb.HealthCheckResponse_SERVING}, nil
	}
	glog.V(10).Infof("HealthCheck called for Service [%s]", in.Service)
	s.statusMap["verifier.VerifierServer"] = healthpb.HealthCheckResponse_SERVING
	status, ok := s.statusMap[in.Service]
	if !ok {
		return &healthpb.HealthCheckResponse{Status: healthpb.HealthCheckResponse_UNKNOWN}, grpc.Errorf(codes.NotFound, "unknown service")
	}
	return &healthpb.HealthCheckResponse{Status: status}, nil
}
func ( s * hserver ) Check ( ctx context . Context , in * healthpb . HealthCheckRequest ) ( * healthpb . HealthCheckResponse , error ) { s . mu . Lock ( ) defer s . mu . Unlock ( ) if in . Service == " " { return & healthpb . HealthCheckResponse { Status : healthpb . HealthCheckResponse_SERVING } , nil } glog . V ( 10 ) . Infof ( " " , in . Service ) s . statusMap [ " " ] = healthpb . HealthCheckResponse_SERVING status , ok := s . statusMap [ in . Service ] if ! ok { return & healthpb . HealthCheckResponse { Status : healthpb . HealthCheckResponse_UNKNOWN } , grpc . Errorf ( codes . NotFound , " " ) } return & healthpb . HealthCheckResponse { Status : status } , nil }
Check() and Watch() are for gRPC healthcheck protocols.
Check () and Watch () are for gRPC healthcheck protocols .
// return overall status