github.com/emcfarlane/larking@v0.0.0-20220605172417-1704b45ee6c3/apipb/healthpb/health.proto (about) 1 // Modified health.proto for annotation support. 2 // 3 // Copyright 2015 The gRPC Authors 4 // 5 // Licensed under the Apache License, Version 2.0 (the "License"); 6 // you may not use this file except in compliance with the License. 7 // 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 // The canonical version of this proto can be found at 18 // https://github.com/grpc/grpc-proto/blob/master/grpc/health/v1/health.proto 19 20 syntax = "proto3"; 21 22 package grpc.health.v1; 23 24 import "google/api/annotations.proto"; 25 26 option go_package = "github.com/emcfarlane/larking/apipb/healthpb;healthpb"; 27 28 message HealthCheckRequest { string service = 1; } 29 30 message HealthCheckResponse { 31 enum ServingStatus { 32 UNKNOWN = 0; 33 SERVING = 1; 34 NOT_SERVING = 2; 35 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 option (google.api.http) = { 45 get : "/v1/health" 46 }; 47 } 48 49 // Performs a watch for the serving status of the requested service. 50 // The server will immediately send back a message indicating the current 51 // serving status. It will then subsequently send a new message whenever 52 // the service's serving status changes. 53 // 54 // If the requested service is unknown when the call is received, the 55 // server will send a message setting the serving status to 56 // SERVICE_UNKNOWN but will *not* terminate the call. If at some 57 // future point, the serving status of the service becomes known, the 58 // server will send a new message with the service's serving status. 59 // 60 // If the call terminates with status UNIMPLEMENTED, then clients 61 // should assume this method is not supported and should not retry the 62 // call. If the call terminates with any other status (including OK), 63 // clients should retry the call with appropriate exponential backoff. 64 rpc Watch(HealthCheckRequest) returns (stream HealthCheckResponse) { 65 option (google.api.http) = { 66 custom : {kind : "websocket" path : "/v1/health:watch"} 67 body : "*" 68 }; 69 } 70 }