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