Skip to content

Commit

Permalink
Merge branch 'master' into pollset_set_test
Browse files Browse the repository at this point in the history
  • Loading branch information
sreecha committed Feb 2, 2017
2 parents 5862f76 + 26623b3 commit 6613168
Show file tree
Hide file tree
Showing 76 changed files with 4,693 additions and 6,202 deletions.
7,494 changes: 3,111 additions & 4,383 deletions CMakeLists.txt

Large diffs are not rendered by default.

8 changes: 8 additions & 0 deletions build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2957,6 +2957,10 @@ targets:
- grpc
- gpr_test_util
- gpr
platforms:
- mac
- linux
- posix
- name: channel_arguments_test
gtest: true
build: test
Expand Down Expand Up @@ -3383,6 +3387,10 @@ targets:
- gpr_test_util
- gpr
- grpc++_test_config
platforms:
- mac
- linux
- posix
- name: metrics_client
build: test
run: false
Expand Down
5 changes: 3 additions & 2 deletions doc/environment_variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ some configuration as environment variables that can be set.
A comma separated list of tracers that provide additional insight into how
gRPC C core is processing requests via debug logs. Available tracers include:
- api - traces api calls to the C core
- call_error - traces the possible errors contributing to final call status
- channel - traces operations on the C core channel stack
- combiner - traces combiner lock state
- compression - traces compression operations
Expand All @@ -55,10 +56,10 @@ some configuration as environment variables that can be set.
- secure_endpoint - traces bytes flowing through encrypted channels
- transport_security - traces metadata about secure channel establishment
- tcp - traces bytes in and out of a channel

'all' can additionally be used to turn all traces on.
Individual traces can be disabled by prefixing them with '-'.

Example:
export GRPC_TRACE=all,-pending_tags

Expand Down
2 changes: 1 addition & 1 deletion examples/csharp/helloworld/generate_protos.bat
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ setlocal
@rem enter this directory
cd /d %~dp0

set TOOLS_PATH=packages\Grpc.Tools.1.0.0\tools\windows_x86
set TOOLS_PATH=packages\Grpc.Tools.1.0.1\tools\windows_x86

%TOOLS_PATH%\protoc.exe -I../../protos --csharp_out Greeter ../../protos/helloworld.proto --grpc_out Greeter --plugin=protoc-gen-grpc=%TOOLS_PATH%\grpc_csharp_plugin.exe

Expand Down
8 changes: 6 additions & 2 deletions examples/php/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@
"name": "grpc/grpc-demo",
"description": "gRPC example for PHP",
"require": {
"ext-grpc": "*",
"grpc/grpc": "v1.0.0"
"grpc/grpc": "v1.1.0"
},
"autoload": {
"psr-4": {
"": "route_guide/"
}
}
}
10 changes: 7 additions & 3 deletions examples/php/greeter_client.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,18 @@
*/

require dirname(__FILE__).'/vendor/autoload.php';
require dirname(__FILE__).'/helloworld.php';

// The following includes are needed when using protobuf 3.1.0
// and will suppress warnings when using protobuf 3.2.0+
@include_once dirname(__FILE__).'/helloworld.pb.php';
@include_once dirname(__FILE__).'/helloworld_grpc_pb.php';

function greet($name)
{
$client = new helloworld\GreeterClient('localhost:50051', [
$client = new Helloworld\GreeterClient('localhost:50051', [
'credentials' => Grpc\ChannelCredentials::createInsecure(),
]);
$request = new helloworld\HelloRequest();
$request = new Helloworld\HelloRequest();
$request->setName($name);
list($reply, $status) = $client->SayHello($request)->wait();
$message = $reply->getMessage();
Expand Down
58 changes: 58 additions & 0 deletions examples/php/helloworld.pb.php

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

168 changes: 0 additions & 168 deletions examples/php/helloworld.php

This file was deleted.

64 changes: 64 additions & 0 deletions examples/php/helloworld_grpc_pb.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
<?php
// GENERATED CODE -- DO NOT EDIT!

// Original file comments:
// Copyright 2015, Google Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
// * Neither the name of Google Inc. nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
namespace Helloworld {

// The greeting service definition.
class GreeterClient extends \Grpc\BaseStub {

/**
* @param string $hostname hostname
* @param array $opts channel options
* @param Grpc\Channel $channel (optional) re-use channel object
*/
public function __construct($hostname, $opts, $channel = null) {
parent::__construct($hostname, $opts, $channel);
}

/**
* Sends a greeting
* @param \Helloworld\HelloRequest $argument input argument
* @param array $metadata metadata
* @param array $options call options
*/
public function SayHello(\Helloworld\HelloRequest $argument,
$metadata = [], $options = []) {
return $this->_simpleRequest('/helloworld.Greeter/SayHello',
$argument,
['\Helloworld\HelloReply', 'decode'],
$metadata, $options);
}

}

}
Loading

0 comments on commit 6613168

Please sign in to comment.