dubbo.apache.org/dubbo-go/v3@v3.1.1/protocol/dubbo3/health/triple_health_v1/health.proto (about)

     1  /*
     2   * Licensed to the Apache Software Foundation (ASF) under one or more
     3   * contributor license agreements.  See the NOTICE file distributed with
     4   * this work for additional information regarding copyright ownership.
     5   * The ASF licenses this file to You under the Apache License, Version 2.0
     6   * (the "License"); you may not use this file except in compliance with
     7   * the License.  You may obtain a copy of the License at
     8   *
     9   *     http://www.apache.org/licenses/LICENSE-2.0
    10   *
    11   * Unless required by applicable law or agreed to in writing, software
    12   * distributed under the License is distributed on an "AS IS" BASIS,
    13   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    14   * See the License for the specific language governing permissions and
    15   * limitations under the License.
    16   */
    17  
    18  // The canonical version of this proto can be found at
    19  // https://github.com/grpc/grpc-proto/blob/master/grpc/health/v1/health.proto
    20  
    21  syntax = "proto3";
    22  
    23  package dubbogo.health.v1;
    24  
    25  option go_package = "github.com/dubbogo/grpc-go/health/triple_health_v1";
    26  
    27  message HealthCheckRequest {
    28    string service = 1;
    29  }
    30  
    31  message HealthCheckResponse {
    32    enum ServingStatus {
    33      UNKNOWN = 0;
    34      SERVING = 1;
    35      NOT_SERVING = 2;
    36      SERVICE_UNKNOWN = 3;  // Used only by the Watch method.
    37    }
    38    ServingStatus status = 1;
    39  }
    40  
    41  service Health {
    42    // If the requested service is unknown, the call will fail with status
    43    // NOT_FOUND.
    44    rpc Check(HealthCheckRequest) returns (HealthCheckResponse);
    45  
    46    // Performs a watch for the serving status of the requested service.
    47    // The server will immediately send back a message indicating the current
    48    // serving status.  It will then subsequently send a new message whenever
    49    // the service's serving status changes.
    50    //
    51    // If the requested service is unknown when the call is received, the
    52    // server will send a message setting the serving status to
    53    // SERVICE_UNKNOWN but will *not* terminate the call.  If at some
    54    // future point, the serving status of the service becomes known, the
    55    // server will send a new message with the service's serving status.
    56    //
    57    // If the call terminates with status UNIMPLEMENTED, then clients
    58    // should assume this method is not supported and should not retry the
    59    // call.  If the call terminates with any other status (including OK),
    60    // clients should retry the call with appropriate exponential backoff.
    61    rpc Watch(HealthCheckRequest) returns (stream HealthCheckResponse);
    62  }