gitee.com/ks-custle/core-gm@v0.0.0-20230922171213-b83bdd97b62c/grpc/stress/grpc_testing/metrics.proto (about)

     1  // Copyright 2015-2016 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  // Contains the definitions for a metrics service and the type of metrics
    16  // exposed by the service.
    17  //
    18  // Currently, 'Gauge' (i.e a metric that represents the measured value of
    19  // something at an instant of time) is the only metric type supported by the
    20  // service.
    21  syntax = "proto3";
    22  
    23  option go_package = "gitee.com/ks-custle/core-gm/grpc/stress/grpc_testing";
    24  
    25  package grpc.testing;
    26  
    27  // Response message containing the gauge name and value
    28  message GaugeResponse {
    29    string name = 1;
    30    oneof value {
    31      int64 long_value = 2;
    32      double double_value = 3;
    33      string string_value = 4;
    34    }
    35  }
    36  
    37  // Request message containing the gauge name
    38  message GaugeRequest {
    39    string name = 1;
    40  }
    41  
    42  message EmptyMessage {}
    43  
    44  service MetricsService {
    45    // Returns the values of all the gauges that are currently being maintained by
    46    // the service
    47    rpc GetAllGauges(EmptyMessage) returns (stream GaugeResponse);
    48  
    49    // Returns the value of one gauge
    50    rpc GetGauge(GaugeRequest) returns (GaugeResponse);
    51  }