1<?php
2// GENERATED CODE -- DO NOT EDIT!
3
4// Original file comments:
5// Copyright 2015-2016 gRPC authors.
6//
7// Licensed under the Apache License, Version 2.0 (the "License");
8// you may not use this file except in compliance with the License.
9// You may obtain a copy of the License at
10//
11//     http://www.apache.org/licenses/LICENSE-2.0
12//
13// Unless required by applicable law or agreed to in writing, software
14// distributed under the License is distributed on an "AS IS" BASIS,
15// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16// See the License for the specific language governing permissions and
17// limitations under the License.
18//
19// Contains the definitions for a metrics service and the type of metrics
20// exposed by the service.
21//
22// Currently, 'Gauge' (i.e a metric that represents the measured value of
23// something at an instant of time) is the only metric type supported by the
24// service.
25namespace Grpc\Testing;
26
27/**
28 */
29class MetricsServiceClient extends \Grpc\BaseStub {
30
31    /**
32     * @param string $hostname hostname
33     * @param array $opts channel options
34     * @param \Grpc\Channel $channel (optional) re-use channel object
35     */
36    public function __construct($hostname, $opts, $channel = null) {
37        parent::__construct($hostname, $opts, $channel);
38    }
39
40    /**
41     * Returns the values of all the gauges that are currently being maintained by
42     * the service
43     * @param \Grpc\Testing\EmptyMessage $argument input argument
44     * @param array $metadata metadata
45     * @param array $options call options
46     */
47    public function GetAllGauges(\Grpc\Testing\EmptyMessage $argument,
48      $metadata = [], $options = []) {
49        return $this->_serverStreamRequest('/grpc.testing.MetricsService/GetAllGauges',
50        $argument,
51        ['\Grpc\Testing\GaugeResponse', 'decode'],
52        $metadata, $options);
53    }
54
55    /**
56     * Returns the value of one gauge
57     * @param \Grpc\Testing\GaugeRequest $argument input argument
58     * @param array $metadata metadata
59     * @param array $options call options
60     */
61    public function GetGauge(\Grpc\Testing\GaugeRequest $argument,
62      $metadata = [], $options = []) {
63        return $this->_simpleRequest('/grpc.testing.MetricsService/GetGauge',
64        $argument,
65        ['\Grpc\Testing\GaugeResponse', 'decode'],
66        $metadata, $options);
67    }
68
69}
70