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. 21syntax = "proto3"; 22 23package grpc.testing; 24 25// Response message containing the gauge name and value 26message GaugeResponse { 27 string name = 1; 28 oneof value { 29 int64 long_value = 2; 30 double double_value = 3; 31 string string_value = 4; 32 } 33} 34 35// Request message containing the gauge name 36message GaugeRequest { 37 string name = 1; 38} 39 40message EmptyMessage {} 41 42service MetricsService { 43 // Returns the values of all the gauges that are currently being maintained by 44 // the service 45 rpc GetAllGauges(EmptyMessage) returns (stream GaugeResponse); 46 47 // Returns the value of one gauge 48 rpc GetGauge(GaugeRequest) returns (GaugeResponse); 49} 50