github.com/bufbuild/connect-grpchealth-go@v1.1.1/internal/proto/connectext/grpc/health/v1/health.proto (about)

     1  // Copyright 2015 gRPC authors.
     2  //
     3  // Licensed under the Apache License, Version 2.0 (the "License");
     4  // you may not use this file except in compliance with the License.
     5  // You may obtain a copy of the License at
     6  //
     7  //     http://www.apache.org/licenses/LICENSE-2.0
     8  //
     9  // Unless required by applicable law or agreed to in writing, software
    10  // distributed under the License is distributed on an "AS IS" BASIS,
    11  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    12  // See the License for the specific language governing permissions and
    13  // limitations under the License.
    14  
    15  syntax = "proto3";
    16  
    17  // This package is intended for internal use by connect-grpc-go, and provides
    18  // no backward compatibility guarantees whatsoever. Apart from the package
    19  // name, the schema here must remain wire compatible with the original.
    20  //
    21  // Copied from gRPC's health check schema, with small modifications to prevent
    22  // init-time panics:
    23  // https://github.com/grpc/grpc-proto/blob/master/grpc/health/v1/health.proto
    24  package connectext.grpc.health.v1;
    25  
    26  message HealthCheckRequest {
    27    string service = 1;
    28  }
    29  
    30  message HealthCheckResponse {
    31    enum ServingStatus {
    32      SERVING_STATUS_UNSPECIFIED = 0;
    33      SERVING_STATUS_SERVING = 1;
    34      SERVING_STATUS_NOT_SERVING = 2;
    35      SERVING_STATUS_SERVICE_UNKNOWN = 3; // Used only by the Watch method.
    36    }
    37    ServingStatus status = 1;
    38  }
    39  
    40  service Health {
    41    // If the requested service is unknown, the call will fail with status
    42    // NOT_FOUND.
    43    rpc Check(HealthCheckRequest) returns (HealthCheckResponse);
    44  
    45    // Performs a watch for the serving status of the requested service.
    46    // The server will immediately send back a message indicating the current
    47    // serving status.  It will then subsequently send a new message whenever
    48    // the service's serving status changes.
    49    //
    50    // If the requested service is unknown when the call is received, the
    51    // server will send a message setting the serving status to
    52    // SERVICE_UNKNOWN but will *not* terminate the call.  If at some
    53    // future point, the serving status of the service becomes known, the
    54    // server will send a new message with the service's serving status.
    55    //
    56    // If the call terminates with status UNIMPLEMENTED, then clients
    57    // should assume this method is not supported and should not retry the
    58    // call.  If the call terminates with any other status (including OK),
    59    // clients should retry the call with appropriate exponential backoff.
    60    rpc Watch(HealthCheckRequest) returns (stream HealthCheckResponse);
    61  }