aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2015-08-31 20:41:57 -0700
committerGravatar Craig Tiller <ctiller@google.com>2015-08-31 20:41:57 -0700
commit6c99868b63bc3932d7f5c5f95ceaad8e91a5c547 (patch)
treee31c9a8572da15e2a8fbaaa05a10097a4b793b81
parent259e627b61b54a9ac0a2e5bb3fc5ec7a6e0309cb (diff)
parent106e15432e0c2c412053a4f6aabac9a1be034576 (diff)
Merge github.com:grpc/grpc into cleaner-build
-rw-r--r--BUILD12
-rw-r--r--Makefile2
-rw-r--r--build.yaml4
-rw-r--r--examples/README.md16
-rw-r--r--examples/cpp/helloworld/greeter_async_client.cc2
-rw-r--r--examples/cpp/helloworld/greeter_async_server.cc2
-rw-r--r--examples/cpp/helloworld/greeter_client.cc2
-rw-r--r--examples/cpp/helloworld/greeter_server.cc2
-rw-r--r--examples/cpp/route_guide/helper.cc4
-rw-r--r--examples/cpp/route_guide/helper.h4
-rw-r--r--examples/cpp/route_guide/route_guide_client.cc20
-rw-r--r--examples/cpp/route_guide/route_guide_server.cc20
-rw-r--r--examples/csharp/README.md2
-rw-r--r--examples/csharp/route_guide/README.md8
-rw-r--r--examples/node/route_guide/README.md10
-rw-r--r--examples/objective-c/auth_sample/README.md6
-rw-r--r--examples/objective-c/helloworld/README.md4
-rw-r--r--examples/objective-c/route_guide/README.md8
-rw-r--r--examples/php/route_guide/README.md28
-rw-r--r--examples/php/route_guide/route_guide.php142
-rw-r--r--examples/php/route_guide/route_guide.proto2
-rw-r--r--examples/php/route_guide/route_guide_client.php16
-rw-r--r--examples/protos/route_guide.proto2
-rw-r--r--examples/python/helloworld/README.md6
-rw-r--r--examples/python/route_guide/README.md10
-rw-r--r--examples/ruby/README.md4
-rw-r--r--examples/ruby/route_guide/README.md10
-rw-r--r--gRPC.podspec7
-rw-r--r--include/grpc/census.h105
-rw-r--r--src/core/census/aggregation.h (renamed from src/core/census/record_stat.c)36
-rw-r--r--src/core/census/grpc_filter.c32
-rw-r--r--src/core/census/rpc_metric_id.h (renamed from src/core/census/rpc_stat_id.h)27
-rw-r--r--src/node/README.md2
-rw-r--r--src/node/package.json2
-rw-r--r--src/objective-c/generated_libraries/RouteGuideClient/route_guide.proto2
-rw-r--r--src/objective-c/tests/LocalClearTextTests.m2
-rwxr-xr-xsrc/ruby/.rspec1
-rwxr-xr-xsrc/ruby/grpc.gemspec2
-rw-r--r--src/ruby/lib/grpc/generic/rpc_server.rb12
-rw-r--r--src/ruby/lib/grpc/version.rb2
-rw-r--r--src/ruby/spec/client_server_spec.rb3
-rw-r--r--src/ruby/spec/pb/health/checker_spec.rb1
-rw-r--r--tools/doxygen/Doxyfile.core.internal4
-rw-r--r--tools/run_tests/sources_and_headers.json14
-rw-r--r--vsprojects/vcxproj/grpc/grpc.vcxproj5
-rw-r--r--vsprojects/vcxproj/grpc/grpc.vcxproj.filters8
-rw-r--r--vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj5
-rw-r--r--vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters8
48 files changed, 369 insertions, 259 deletions
diff --git a/BUILD b/BUILD
index aa82a9cf41..7511320a4c 100644
--- a/BUILD
+++ b/BUILD
@@ -245,8 +245,9 @@ cc_library(
"src/core/transport/stream_op.h",
"src/core/transport/transport.h",
"src/core/transport/transport_impl.h",
+ "src/core/census/aggregation.h",
"src/core/census/context.h",
- "src/core/census/rpc_stat_id.h",
+ "src/core/census/rpc_metric_id.h",
"src/core/httpcli/httpcli_security_connector.c",
"src/core/security/base64.c",
"src/core/security/client_auth_filter.c",
@@ -387,7 +388,6 @@ cc_library(
"src/core/census/context.c",
"src/core/census/initialize.c",
"src/core/census/operation.c",
- "src/core/census/record_stat.c",
"src/core/census/tracing.c",
],
hdrs = [
@@ -515,8 +515,9 @@ cc_library(
"src/core/transport/stream_op.h",
"src/core/transport/transport.h",
"src/core/transport/transport_impl.h",
+ "src/core/census/aggregation.h",
"src/core/census/context.h",
- "src/core/census/rpc_stat_id.h",
+ "src/core/census/rpc_metric_id.h",
"src/core/surface/init_unsecure.c",
"src/core/census/grpc_context.c",
"src/core/census/grpc_filter.c",
@@ -637,7 +638,6 @@ cc_library(
"src/core/census/context.c",
"src/core/census/initialize.c",
"src/core/census/operation.c",
- "src/core/census/record_stat.c",
"src/core/census/tracing.c",
],
hdrs = [
@@ -1152,7 +1152,6 @@ objc_library(
"src/core/census/context.c",
"src/core/census/initialize.c",
"src/core/census/operation.c",
- "src/core/census/record_stat.c",
"src/core/census/tracing.c",
],
hdrs = [
@@ -1277,8 +1276,9 @@ objc_library(
"src/core/transport/stream_op.h",
"src/core/transport/transport.h",
"src/core/transport/transport_impl.h",
+ "src/core/census/aggregation.h",
"src/core/census/context.h",
- "src/core/census/rpc_stat_id.h",
+ "src/core/census/rpc_metric_id.h",
],
includes = [
"include",
diff --git a/Makefile b/Makefile
index 9a0f9414ed..b724ee2a7c 100644
--- a/Makefile
+++ b/Makefile
@@ -4150,7 +4150,6 @@ LIBGRPC_SRC = \
src/core/census/context.c \
src/core/census/initialize.c \
src/core/census/operation.c \
- src/core/census/record_stat.c \
src/core/census/tracing.c \
PUBLIC_HEADERS_C += \
@@ -4426,7 +4425,6 @@ LIBGRPC_UNSECURE_SRC = \
src/core/census/context.c \
src/core/census/initialize.c \
src/core/census/operation.c \
- src/core/census/record_stat.c \
src/core/census/tracing.c \
PUBLIC_HEADERS_C += \
diff --git a/build.yaml b/build.yaml
index 8465589bbd..183c0ae78f 100644
--- a/build.yaml
+++ b/build.yaml
@@ -7,9 +7,9 @@ settings:
filegroups:
- name: census
public_headers: [include/grpc/census.h]
- headers: [src/core/census/context.h, src/core/census/rpc_stat_id.h]
+ headers: [src/core/census/aggregation.h, src/core/census/context.h, src/core/census/rpc_metric_id.h]
src: [src/core/census/context.c, src/core/census/initialize.c, src/core/census/operation.c,
- src/core/census/record_stat.c, src/core/census/tracing.c]
+ src/core/census/tracing.c]
- name: grpc++_base
public_headers: [include/grpc++/channel.h, include/grpc++/client_context.h, include/grpc++/completion_queue.h,
include/grpc++/create_channel.h, include/grpc++/generic/async_generic_service.h,
diff --git a/examples/README.md b/examples/README.md
index 6465115e18..cc4b239f8e 100644
--- a/examples/README.md
+++ b/examples/README.md
@@ -10,16 +10,16 @@ Hello World example. You'll find more tutorials and reference docs in this repos
<a name="quickstart"></a>
## Quick start
You can find quick start guides for each language, including installation instructions, examples, and tutorials here:
-* [C++](examples/cpp)
+* [C++](cpp)
* [Java](https://github.com/grpc/grpc-java/tree/master/examples)
* [Go](https://github.com/grpc/grpc-go/tree/master/examples)
-* [Ruby](examples/ruby)
-* [Node.js](examples/node)
-* [Android Java](examples/java/android)
-* [Python](examples/python/helloworld)
-* [C#](examples/csharp)
-* [Objective-C](examples/objective-c/route_guide)
-* [PHP](examples/php)
+* [Ruby](ruby)
+* [Node.js](node)
+* [Android Java](https://github.com/grpc/grpc-java/tree/master/examples/android)
+* [Python](python/helloworld)
+* [C#](csharp)
+* [Objective-C](objective-c/route_guide)
+* [PHP](php)
## What's in this repository?
diff --git a/examples/cpp/helloworld/greeter_async_client.cc b/examples/cpp/helloworld/greeter_async_client.cc
index 875599e161..605fb7fb3a 100644
--- a/examples/cpp/helloworld/greeter_async_client.cc
+++ b/examples/cpp/helloworld/greeter_async_client.cc
@@ -41,7 +41,7 @@
#include <grpc++/client_context.h>
#include <grpc++/completion_queue.h>
#include <grpc++/create_channel.h>
-#include <grpc++/credentials.h>
+#include <grpc++/security/credentials.h>
#include "helloworld.grpc.pb.h"
using grpc::Channel;
diff --git a/examples/cpp/helloworld/greeter_async_server.cc b/examples/cpp/helloworld/greeter_async_server.cc
index b8a0dbf0e2..189c3afe6d 100644
--- a/examples/cpp/helloworld/greeter_async_server.cc
+++ b/examples/cpp/helloworld/greeter_async_server.cc
@@ -39,10 +39,10 @@
#include <grpc/grpc.h>
#include <grpc/support/log.h>
#include <grpc++/completion_queue.h>
+#include <grpc++/security/server_credentials.h>
#include <grpc++/server.h>
#include <grpc++/server_builder.h>
#include <grpc++/server_context.h>
-#include <grpc++/server_credentials.h>
#include "helloworld.grpc.pb.h"
using grpc::Server;
diff --git a/examples/cpp/helloworld/greeter_client.cc b/examples/cpp/helloworld/greeter_client.cc
index 3d2fcba610..bfb7c12724 100644
--- a/examples/cpp/helloworld/greeter_client.cc
+++ b/examples/cpp/helloworld/greeter_client.cc
@@ -39,7 +39,7 @@
#include <grpc++/channel.h>
#include <grpc++/client_context.h>
#include <grpc++/create_channel.h>
-#include <grpc++/credentials.h>
+#include <grpc++/security/credentials.h>
#include "helloworld.grpc.pb.h"
using grpc::Channel;
diff --git a/examples/cpp/helloworld/greeter_server.cc b/examples/cpp/helloworld/greeter_server.cc
index c1efdf563c..b434752d87 100644
--- a/examples/cpp/helloworld/greeter_server.cc
+++ b/examples/cpp/helloworld/greeter_server.cc
@@ -36,10 +36,10 @@
#include <string>
#include <grpc/grpc.h>
+#include <grpc++/security/server_credentials.h>
#include <grpc++/server.h>
#include <grpc++/server_builder.h>
#include <grpc++/server_context.h>
-#include <grpc++/server_credentials.h>
#include "helloworld.grpc.pb.h"
using grpc::Server;
diff --git a/examples/cpp/route_guide/helper.cc b/examples/cpp/route_guide/helper.cc
index c2415afdf7..f76990f6fc 100644
--- a/examples/cpp/route_guide/helper.cc
+++ b/examples/cpp/route_guide/helper.cc
@@ -40,7 +40,7 @@
#include <vector>
#include "route_guide.grpc.pb.h"
-namespace examples {
+namespace routeguide {
std::string GetDbFileContent(int argc, char** argv) {
std::string db_path;
@@ -174,5 +174,5 @@ void ParseDb(const std::string& db, std::vector<Feature>* feature_list) {
}
-} // namespace examples
+} // namespace routeguide
diff --git a/examples/cpp/route_guide/helper.h b/examples/cpp/route_guide/helper.h
index 65c93c1d34..db36596f90 100644
--- a/examples/cpp/route_guide/helper.h
+++ b/examples/cpp/route_guide/helper.h
@@ -37,14 +37,14 @@
#include <string>
#include <vector>
-namespace examples {
+namespace routeguide {
class Feature;
std::string GetDbFileContent(int argc, char** argv);
void ParseDb(const std::string& db, std::vector<Feature>* feature_list);
-} // namespace examples
+} // namespace routeguide
#endif // GRPC_COMMON_CPP_ROUTE_GUIDE_HELPER_H_
diff --git a/examples/cpp/route_guide/route_guide_client.cc b/examples/cpp/route_guide/route_guide_client.cc
index ec0a75e039..85173a3932 100644
--- a/examples/cpp/route_guide/route_guide_client.cc
+++ b/examples/cpp/route_guide/route_guide_client.cc
@@ -42,7 +42,7 @@
#include <grpc++/channel.h>
#include <grpc++/client_context.h>
#include <grpc++/create_channel.h>
-#include <grpc++/credentials.h>
+#include <grpc++/security/credentials.h>
#include "helper.h"
#include "route_guide.grpc.pb.h"
@@ -52,12 +52,12 @@ using grpc::ClientReader;
using grpc::ClientReaderWriter;
using grpc::ClientWriter;
using grpc::Status;
-using examples::Point;
-using examples::Feature;
-using examples::Rectangle;
-using examples::RouteSummary;
-using examples::RouteNote;
-using examples::RouteGuide;
+using routeguide::Point;
+using routeguide::Feature;
+using routeguide::Rectangle;
+using routeguide::RouteSummary;
+using routeguide::RouteNote;
+using routeguide::RouteGuide;
Point MakePoint(long latitude, long longitude) {
Point p;
@@ -86,7 +86,7 @@ class RouteGuideClient {
public:
RouteGuideClient(std::shared_ptr<Channel> channel, const std::string& db)
: stub_(RouteGuide::NewStub(channel)) {
- examples::ParseDb(db, &feature_list_);
+ routeguide::ParseDb(db, &feature_list_);
}
void GetFeature() {
@@ -99,7 +99,7 @@ class RouteGuideClient {
}
void ListFeatures() {
- examples::Rectangle rect;
+ routeguide::Rectangle rect;
Feature feature;
ClientContext context;
@@ -232,7 +232,7 @@ class RouteGuideClient {
int main(int argc, char** argv) {
// Expect only arg: --db_path=path/to/route_guide_db.json.
- std::string db = examples::GetDbFileContent(argc, argv);
+ std::string db = routeguide::GetDbFileContent(argc, argv);
RouteGuideClient guide(
grpc::CreateChannel("localhost:50051", grpc::InsecureCredentials()),
db);
diff --git a/examples/cpp/route_guide/route_guide_server.cc b/examples/cpp/route_guide/route_guide_server.cc
index b37539299a..2be5742862 100644
--- a/examples/cpp/route_guide/route_guide_server.cc
+++ b/examples/cpp/route_guide/route_guide_server.cc
@@ -42,7 +42,7 @@
#include <grpc++/server.h>
#include <grpc++/server_builder.h>
#include <grpc++/server_context.h>
-#include <grpc++/server_credentials.h>
+#include <grpc++/security/server_credentials.h>
#include "helper.h"
#include "route_guide.grpc.pb.h"
@@ -53,12 +53,12 @@ using grpc::ServerReader;
using grpc::ServerReaderWriter;
using grpc::ServerWriter;
using grpc::Status;
-using examples::Point;
-using examples::Feature;
-using examples::Rectangle;
-using examples::RouteSummary;
-using examples::RouteNote;
-using examples::RouteGuide;
+using routeguide::Point;
+using routeguide::Feature;
+using routeguide::Rectangle;
+using routeguide::RouteSummary;
+using routeguide::RouteNote;
+using routeguide::RouteGuide;
using std::chrono::system_clock;
@@ -99,7 +99,7 @@ std::string GetFeatureName(const Point& point,
class RouteGuideImpl final : public RouteGuide::Service {
public:
explicit RouteGuideImpl(const std::string& db) {
- examples::ParseDb(db, &feature_list_);
+ routeguide::ParseDb(db, &feature_list_);
}
Status GetFeature(ServerContext* context, const Point* point,
@@ -110,7 +110,7 @@ class RouteGuideImpl final : public RouteGuide::Service {
}
Status ListFeatures(ServerContext* context,
- const examples::Rectangle* rectangle,
+ const routeguide::Rectangle* rectangle,
ServerWriter<Feature>* writer) override {
auto lo = rectangle->lo();
auto hi = rectangle->hi();
@@ -195,7 +195,7 @@ void RunServer(const std::string& db_path) {
int main(int argc, char** argv) {
// Expect only arg: --db_path=path/to/route_guide_db.json.
- std::string db = examples::GetDbFileContent(argc, argv);
+ std::string db = routeguide::GetDbFileContent(argc, argv);
RunServer(db);
return 0;
diff --git a/examples/csharp/README.md b/examples/csharp/README.md
index fcdcc735f9..3719080f4a 100644
--- a/examples/csharp/README.md
+++ b/examples/csharp/README.md
@@ -69,4 +69,4 @@ On Linux or Mac, use `mono GreeterServer.exe` and `mono GreeterClient.exe` to ru
Tutorial
--------
-You can find a more detailed tutorial in [gRPC Basics: C#](examples/csharp/route_guide/README.md)
+You can find a more detailed tutorial in [gRPC Basics: C#](route_guide/README.md)
diff --git a/examples/csharp/route_guide/README.md b/examples/csharp/route_guide/README.md
index c3262c9b8a..ec9a0c048e 100644
--- a/examples/csharp/route_guide/README.md
+++ b/examples/csharp/route_guide/README.md
@@ -18,7 +18,7 @@ With gRPC we can define our service once in a .proto file and implement clients
## Example code and setup
-The example code for our tutorial is in [examples/csharp/route_guide](examples/csharp/route_guide). To download the example, clone this repository by running the following command:
+The example code for our tutorial is in [examples/csharp/route_guide](.). To download the example, clone this repository by running the following command:
```shell
$ git clone https://github.com/grpc/grpc.git
```
@@ -34,7 +34,7 @@ able to generate the server and client interface code and run the examples. Foll
## Defining the service
-Our first step (as you'll know from [Getting started](https://github.com/grpc/grpc/tree/master/examples)) is to define the gRPC *service* and the method *request* and *response* types using [protocol buffers] (https://developers.google.com/protocol-buffers/docs/overview). You can see the complete .proto file in [`examples/csharp/route_guide/RouteGuide/protos/route_guide.proto`](examples/csharp/route_guide/RouteGuide/protos/route_guide.proto).
+Our first step (as you'll know from [Getting started](https://github.com/grpc/grpc/tree/master/examples)) is to define the gRPC *service* and the method *request* and *response* types using [protocol buffers] (https://developers.google.com/protocol-buffers/docs/overview). You can see the complete .proto file in [`RouteGuide/protos/route_guide.proto`](RouteGuide/protos/route_guide.proto).
To define a service, you specify a named `service` in your .proto file:
@@ -127,7 +127,7 @@ There are two parts to making our `RouteGuide` service do its job:
- Implementing the service interface generated from our service definition: doing the actual "work" of our service.
- Running a gRPC server to listen for requests from clients and return the service responses.
-You can find our example `RouteGuide` server in [examples/csharp/route_guide/RouteGuideServer/RouteGuideImpl.cs](examples/csharp/route_guide/RouteGuideServer/RouteGuideServerImpl.cs). Let's take a closer look at how it works.
+You can find our example `RouteGuide` server in [RouteGuideServer/RouteGuideImpl.cs](RouteGuideServer/RouteGuideServerImpl.cs). Let's take a closer look at how it works.
### Implementing RouteGuide
@@ -288,7 +288,7 @@ As you can see, we build and start our server using `Grpc.Core.Server` class. To
<a name="client"></a>
## Creating the client
-In this section, we'll look at creating a C# client for our `RouteGuide` service. You can see our complete example client code in [examples/csharp/route_guide/RouteGuideClient/Program.cs](examples/csharp/route_guide/RouteGuideClient/Program.cs).
+In this section, we'll look at creating a C# client for our `RouteGuide` service. You can see our complete example client code in [RouteGuideClient/Program.cs](RouteGuideClient/Program.cs).
### Creating a stub
diff --git a/examples/node/route_guide/README.md b/examples/node/route_guide/README.md
index 2efc5a5da5..1dbaac9f9f 100644
--- a/examples/node/route_guide/README.md
+++ b/examples/node/route_guide/README.md
@@ -17,7 +17,7 @@ With gRPC we can define our service once in a .proto file and implement clients
## Example code and setup
-The example code for our tutorial is in [examples/node/route_guide](examples/node/route_guide). To download the example, clone this repository by running the following command:
+The example code for our tutorial is in [examples/node/route_guide](.). To download the example, clone this repository by running the following command:
```shell
$ git clone https://github.com/grpc/grpc.git
```
@@ -27,12 +27,12 @@ Then change your current directory to `examples/node/route_guide`:
$ cd examples/node/route_guide
```
-You also should have the relevant tools installed to generate the server and client interface code - if you don't already, follow the setup instructions in [the Node.js quick start guide](examples/node).
+You also should have the relevant tools installed to generate the server and client interface code - if you don't already, follow the setup instructions in [the Node.js quick start guide](..).
## Defining the service
-Our first step (as you'll know from [Getting started](https://github.com/grpc/grpc/tree/master/examples)) is to define the gRPC *service* and the method *request* and *response* types using [protocol buffers] (https://developers.google.com/protocol-buffers/docs/overview). You can see the complete .proto file in [`examples/protos/route_guide.proto`](examples/protos/route_guide.proto).
+Our first step (as you'll know from [Getting started](https://github.com/grpc/grpc/tree/master/examples)) is to define the gRPC *service* and the method *request* and *response* types using [protocol buffers] (https://developers.google.com/protocol-buffers/docs/overview). You can see the complete .proto file in [`examples/protos/route_guide.proto`](../../route_guide.proto).
To define a service, you specify a named `service` in your .proto file:
@@ -110,7 +110,7 @@ There are two parts to making our `RouteGuide` service do its job:
- Implementing the service interface generated from our service definition: doing the actual "work" of our service.
- Running a gRPC server to listen for requests from clients and return the service responses.
-You can find our example `RouteGuide` server in [examples/node/route_guide/route_guide_server.js](examples/node/route_guide/route_guide_server.js). Let's take a closer look at how it works.
+You can find our example `RouteGuide` server in [route_guide_server.js](route_guide_server.js). Let's take a closer look at how it works.
### Implementing RouteGuide
@@ -244,7 +244,7 @@ As you can see, we build and start our server with the following steps:
<a name="client"></a>
## Creating the client
-In this section, we'll look at creating a Node.js client for our `RouteGuide` service. You can see our complete example client code in [examples/node/route_guide/route_guide_client.js](examples/node/route_guide/route_guide_client.js).
+In this section, we'll look at creating a Node.js client for our `RouteGuide` service. You can see our complete example client code in [route_guide_client.js](route_guide_client.js).
### Creating a stub
diff --git a/examples/objective-c/auth_sample/README.md b/examples/objective-c/auth_sample/README.md
index 3dbe7e334c..5ae6452619 100644
--- a/examples/objective-c/auth_sample/README.md
+++ b/examples/objective-c/auth_sample/README.md
@@ -9,8 +9,8 @@ headers.
- Read response metadata from a call, which is equivalent to HTTP response headers and trailers.
It assumes you know the basics on how to make gRPC API calls using the Objective-C client library,
-as shown in the [Hello World](examples/objective-c/helloworld)
-or [Route Guide](examples/objective-c/route_guide) tutorials,
+as shown in the [Hello World](../helloworld)
+or [Route Guide](../route_guide) tutorials,
and are familiar with OAuth2 concepts like _access token_.
- [Example code and setup](#setup)
@@ -22,7 +22,7 @@ and are familiar with OAuth2 concepts like _access token_.
<a name="setup"></a>
## Example code and setup
-The example code for our tutorial is in [examples/objective-c/auth_sample](examples/objective-c/auth_sample).
+The example code for our tutorial is in [examples/objective-c/auth_sample](.).
To download the example, clone this repository by running the following command:
```shell
$ git clone https://github.com/grpc/grpc.git
diff --git a/examples/objective-c/helloworld/README.md b/examples/objective-c/helloworld/README.md
index 3b852f857f..75df1a7a26 100644
--- a/examples/objective-c/helloworld/README.md
+++ b/examples/objective-c/helloworld/README.md
@@ -8,7 +8,7 @@ testing). You can obtain the latter by following [these setup instructions](http
## Hello Objective-C gRPC!
-Here's how to build and run the Objective-C implementation of the [Hello World](examples/protos/helloworld.proto)
+Here's how to build and run the Objective-C implementation of the [Hello World](../../protos/helloworld.proto)
example used in [Getting started](https://github.com/grpc/grpc/tree/master/examples).
The example code for this and our other examples lives in the `examples` directory. Clone
@@ -53,4 +53,4 @@ responds with a `HLWHelloResponse`, which contains a string that is then output
## Tutorial
-You can find a more detailed tutorial in [gRPC Basics: Objective-C](examples/objective-c/route_guide/README.md).
+You can find a more detailed tutorial in [gRPC Basics: Objective-C](../route_guide/README.md).
diff --git a/examples/objective-c/route_guide/README.md b/examples/objective-c/route_guide/README.md
index dd20a07995..15864c01f4 100644
--- a/examples/objective-c/route_guide/README.md
+++ b/examples/objective-c/route_guide/README.md
@@ -43,7 +43,7 @@ code is limited by the dynamic nature of the language.
<a name="setup"></a>
## Example code and setup
-The example code for our tutorial is in [examples/objective-c/route_guide](examples/objective-c/route_guide).
+The example code for our tutorial is in [examples/objective-c/route_guide](.).
To download the example, clone this repository by running the following command:
```shell
$ git clone https://github.com/grpc/grpc.git
@@ -97,7 +97,7 @@ a client library from it, and how to create an app that uses that library.
First let's look at how the service we're using is defined. A gRPC *service* and its method
*request* and *response* types using [protocol buffers](https://developers.google.com/protocol-buffers/docs/overview).
-You can see the complete .proto file for our example in [`examples/protos/route_guide.proto`](examples/protos/route_guide.proto).
+You can see the complete .proto file for our example in [`examples/protos/route_guide.proto`](../../protos/route_guide.proto).
To define a service, you specify a named `service` in your .proto file:
@@ -177,7 +177,7 @@ option objc_class_prefix = "RTG";
Next we need to generate the gRPC client interfaces from our .proto service definition. We do this
using the protocol buffer compiler (`protoc`) with a special gRPC Objective-C plugin.
-For simplicity, we've provided a [Podspec file](examples/objective-c/route_guide/RouteGuide.podspec)
+For simplicity, we've provided a [Podspec file](RouteGuide.podspec)
that runs `protoc` for you with the appropriate plugin, input, and output, and describes how to
compile the generated files. You just need to run in this directory (`examples/objective-c/route_guide`):
@@ -211,7 +211,7 @@ definition; just replace the name (matching the file name), version, and other m
## Creating the client
In this section, we'll look at creating an Objective-C client for our `RouteGuide` service. You can
-see our complete example client code in [examples/objective-c/route_guide/ViewControllers.m](examples/objective-c/route_guide/ViewControllers.m).
+see our complete example client code in [ViewControllers.m](ViewControllers.m).
(Note: In your apps, for maintainability and readability reasons, you shouldn't put all of your view
controllers in a single file; it's done here only to simplify the learning process).
diff --git a/examples/php/route_guide/README.md b/examples/php/route_guide/README.md
index e5230ae4e4..00610ffb09 100644
--- a/examples/php/route_guide/README.md
+++ b/examples/php/route_guide/README.md
@@ -8,7 +8,7 @@ This tutorial provides a basic PHP programmer's introduction to working with gRP
It assumes a passing familiarity with [protocol buffers](https://developers.google.com/protocol-buffers/docs/overview). Note that the example in this tutorial uses the proto2 version of the protocol buffers language.
-Also note that currently you can only create clients in PHP for gRPC services - you can find out how to create gRPC servers in our other tutorials, e.g. [Node.js](examples/node/route_guide).
+Also note that currently you can only create clients in PHP for gRPC services - you can find out how to create gRPC servers in our other tutorials, e.g. [Node.js](../node/route_guide).
This isn't a comprehensive guide to using gRPC in PHP: more reference documentation is coming soon.
@@ -29,7 +29,7 @@ With gRPC you can define your service once in a .proto file and implement client
<a name="setup"></a>
## Example code and setup
-The example code for our tutorial is in [examples/php/route_guide](examples/php/route_guide). To download the example, clone this repository by running the following command:
+The example code for our tutorial is in [examples/php/route_guide](.). To download the example, clone this repository by running the following command:
```shell
$ git clone https://github.com/grpc/grpc.git
```
@@ -68,7 +68,7 @@ The next sections guide you step-by-step through how this proto service is defin
<a name="proto"></a>
## Defining the service
-First let's look at how the service we're using is defined. A gRPC *service* and its method *request* and *response* types using [protocol buffers](https://developers.google.com/protocol-buffers/docs/overview). You can see the complete .proto file for our example in [`examples/protos/route_guide.proto`](examples/protos/route_guide.proto).
+First let's look at how the service we're using is defined. A gRPC *service* and its method *request* and *response* types using [protocol buffers](https://developers.google.com/protocol-buffers/docs/overview). You can see the complete .proto file for our example in [`route_guide.proto`](route_guide.proto).
To define a service, you specify a named `service` in your .proto file:
@@ -153,20 +153,20 @@ require dirname(__FILE__) . '/route_guide.php';
The file contains:
- All the protocol buffer code to populate, serialize, and retrieve our request and response message types.
-- A class called `examples\RouteGuideClient` that lets clients call the methods defined in the `RouteGuide` service.
+- A class called `routeguide\RouteGuideClient` that lets clients call the methods defined in the `RouteGuide` service.
<a name="client"></a>
## Creating the client
-In this section, we'll look at creating a PHP client for our `RouteGuide` service. You can see our complete example client code in [examples/php/route_guide/route_guide_client.php](examples/php/route_guide/route_guide_client.php).
+In this section, we'll look at creating a PHP client for our `RouteGuide` service. You can see our complete example client code in [route_guide_client.php](route_guide_client.php).
### Constructing a client object
To call service methods, we first need to create a client object, an instance of the generated `RouteGuideClient` class. The constructor of the class expects the server address and port we want to connect to:
```php
-$client = new examples\RouteGuideClient(new Grpc\BaseStub('localhost:50051', []));
+$client = new routeguide\RouteGuideClient(new Grpc\BaseStub('localhost:50051', []));
```
### Calling service methods
@@ -178,13 +178,13 @@ Now let's look at how we call our service methods.
Calling the simple RPC `GetFeature` is nearly as straightforward as calling a local asynchronous method.
```php
- $point = new examples\Point();
+ $point = new routeguide\Point();
$point->setLatitude(409146138);
$point->setLongitude(-746188906);
list($feature, $status) = $client->GetFeature($point)->wait();
```
-As you can see, we create and populate a request object, i.e. an `examples\Point` object. Then, we call the method on the stub, passing it the request object. If there is no error, then we can read the response information from the server from our response object, i.e. an `examples\Feature` object.
+As you can see, we create and populate a request object, i.e. an `routeguide\Point` object. Then, we call the method on the stub, passing it the request object. If there is no error, then we can read the response information from the server from our response object, i.e. an `routeguide\Feature` object.
```php
print sprintf("Found %s \n at %f, %f\n", $feature->getName(),
@@ -197,15 +197,15 @@ As you can see, we create and populate a request object, i.e. an `examples\Point
Now let's look at our streaming methods. Here's where we call the server-side streaming method `ListFeatures`, which returns a stream of geographical `Feature`s:
```php
- $lo_point = new examples\Point();
- $hi_point = new examples\Point();
+ $lo_point = new routeguide\Point();
+ $hi_point = new routeguide\Point();
$lo_point->setLatitude(400000000);
$lo_point->setLongitude(-750000000);
$hi_point->setLatitude(420000000);
$hi_point->setLongitude(-730000000);
- $rectangle = new examples\Rectangle();
+ $rectangle = new routeguide\Rectangle();
$rectangle->setLo($lo_point);
$rectangle->setHi($hi_point);
@@ -219,12 +219,12 @@ Now let's look at our streaming methods. Here's where we call the server-side st
The `$call->responses()` method call returns an iterator. When the server sends a response, a `$feature` object will be returned in the `foreach` loop, until the server indiciates that there will be no more responses to be sent.
-The client-side streaming method `RecordRoute` is similar, except there we pass the method an iterator and get back a `examples\RouteSummary`.
+The client-side streaming method `RecordRoute` is similar, except there we pass the method an iterator and get back a `routeguide\RouteSummary`.
```php
$points_iter = function($db) {
for ($i = 0; $i < $num_points; $i++) {
- $point = new examples\Point();
+ $point = new routeguide\Point();
$point->setLatitude($lat);
$point->setLongitude($long);
yield $point;
@@ -245,7 +245,7 @@ To write messages from the client:
```php
foreach ($notes as $n) {
- $route_note = new examples\RouteNote();
+ $route_note = new routerguide\RouteNote();
$call->write($route_note);
}
$call->writesDone();
diff --git a/examples/php/route_guide/route_guide.php b/examples/php/route_guide/route_guide.php
index a836e03b55..76086f9772 100644
--- a/examples/php/route_guide/route_guide.php
+++ b/examples/php/route_guide/route_guide.php
@@ -1,9 +1,9 @@
<?php
// DO NOT EDIT! Generated by Protobuf-PHP protoc plugin 1.0
// Source: route_guide.proto
-// Date: 2015-06-12 00:32:41
+// Date: 2015-08-31 21:11:45
-namespace examples {
+namespace routeguide {
class Point extends \DrSlump\Protobuf\Message {
@@ -19,7 +19,7 @@ namespace examples {
public static function descriptor()
{
- $descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'examples.Point');
+ $descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'routeguide.Point');
// OPTIONAL INT32 latitude = 1
$f = new \DrSlump\Protobuf\Field();
@@ -58,7 +58,7 @@ namespace examples {
/**
* Clear <latitude> value
*
- * @return \examples\Point
+ * @return \routeguide\Point
*/
public function clearLatitude(){
return $this->_clear(1);
@@ -77,7 +77,7 @@ namespace examples {
* Set <latitude> value
*
* @param int $value
- * @return \examples\Point
+ * @return \routeguide\Point
*/
public function setLatitude( $value){
return $this->_set(1, $value);
@@ -95,7 +95,7 @@ namespace examples {
/**
* Clear <longitude> value
*
- * @return \examples\Point
+ * @return \routeguide\Point
*/
public function clearLongitude(){
return $this->_clear(2);
@@ -114,7 +114,7 @@ namespace examples {
* Set <longitude> value
*
* @param int $value
- * @return \examples\Point
+ * @return \routeguide\Point
*/
public function setLongitude( $value){
return $this->_set(2, $value);
@@ -122,14 +122,14 @@ namespace examples {
}
}
-namespace examples {
+namespace routeguide {
class Rectangle extends \DrSlump\Protobuf\Message {
- /** @var \examples\Point */
+ /** @var \routeguide\Point */
public $lo = null;
- /** @var \examples\Point */
+ /** @var \routeguide\Point */
public $hi = null;
@@ -138,7 +138,7 @@ namespace examples {
public static function descriptor()
{
- $descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'examples.Rectangle');
+ $descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'routeguide.Rectangle');
// OPTIONAL MESSAGE lo = 1
$f = new \DrSlump\Protobuf\Field();
@@ -146,7 +146,7 @@ namespace examples {
$f->name = "lo";
$f->type = \DrSlump\Protobuf::TYPE_MESSAGE;
$f->rule = \DrSlump\Protobuf::RULE_OPTIONAL;
- $f->reference = '\examples\Point';
+ $f->reference = '\routeguide\Point';
$descriptor->addField($f);
// OPTIONAL MESSAGE hi = 2
@@ -155,7 +155,7 @@ namespace examples {
$f->name = "hi";
$f->type = \DrSlump\Protobuf::TYPE_MESSAGE;
$f->rule = \DrSlump\Protobuf::RULE_OPTIONAL;
- $f->reference = '\examples\Point';
+ $f->reference = '\routeguide\Point';
$descriptor->addField($f);
foreach (self::$__extensions as $cb) {
@@ -177,7 +177,7 @@ namespace examples {
/**
* Clear <lo> value
*
- * @return \examples\Rectangle
+ * @return \routeguide\Rectangle
*/
public function clearLo(){
return $this->_clear(1);
@@ -186,7 +186,7 @@ namespace examples {
/**
* Get <lo> value
*
- * @return \examples\Point
+ * @return \routeguide\Point
*/
public function getLo(){
return $this->_get(1);
@@ -195,10 +195,10 @@ namespace examples {
/**
* Set <lo> value
*
- * @param \examples\Point $value
- * @return \examples\Rectangle
+ * @param \routeguide\Point $value
+ * @return \routeguide\Rectangle
*/
- public function setLo(\examples\Point $value){
+ public function setLo(\routeguide\Point $value){
return $this->_set(1, $value);
}
@@ -214,7 +214,7 @@ namespace examples {
/**
* Clear <hi> value
*
- * @return \examples\Rectangle
+ * @return \routeguide\Rectangle
*/
public function clearHi(){
return $this->_clear(2);
@@ -223,7 +223,7 @@ namespace examples {
/**
* Get <hi> value
*
- * @return \examples\Point
+ * @return \routeguide\Point
*/
public function getHi(){
return $this->_get(2);
@@ -232,23 +232,23 @@ namespace examples {
/**
* Set <hi> value
*
- * @param \examples\Point $value
- * @return \examples\Rectangle
+ * @param \routeguide\Point $value
+ * @return \routeguide\Rectangle
*/
- public function setHi(\examples\Point $value){
+ public function setHi(\routeguide\Point $value){
return $this->_set(2, $value);
}
}
}
-namespace examples {
+namespace routeguide {
class Feature extends \DrSlump\Protobuf\Message {
/** @var string */
public $name = null;
- /** @var \examples\Point */
+ /** @var \routeguide\Point */
public $location = null;
@@ -257,7 +257,7 @@ namespace examples {
public static function descriptor()
{
- $descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'examples.Feature');
+ $descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'routeguide.Feature');
// OPTIONAL STRING name = 1
$f = new \DrSlump\Protobuf\Field();
@@ -273,7 +273,7 @@ namespace examples {
$f->name = "location";
$f->type = \DrSlump\Protobuf::TYPE_MESSAGE;
$f->rule = \DrSlump\Protobuf::RULE_OPTIONAL;
- $f->reference = '\examples\Point';
+ $f->reference = '\routeguide\Point';
$descriptor->addField($f);
foreach (self::$__extensions as $cb) {
@@ -295,7 +295,7 @@ namespace examples {
/**
* Clear <name> value
*
- * @return \examples\Feature
+ * @return \routeguide\Feature
*/
public function clearName(){
return $this->_clear(1);
@@ -314,7 +314,7 @@ namespace examples {
* Set <name> value
*
* @param string $value
- * @return \examples\Feature
+ * @return \routeguide\Feature
*/
public function setName( $value){
return $this->_set(1, $value);
@@ -332,7 +332,7 @@ namespace examples {
/**
* Clear <location> value
*
- * @return \examples\Feature
+ * @return \routeguide\Feature
*/
public function clearLocation(){
return $this->_clear(2);
@@ -341,7 +341,7 @@ namespace examples {
/**
* Get <location> value
*
- * @return \examples\Point
+ * @return \routeguide\Point
*/
public function getLocation(){
return $this->_get(2);
@@ -350,20 +350,20 @@ namespace examples {
/**
* Set <location> value
*
- * @param \examples\Point $value
- * @return \examples\Feature
+ * @param \routeguide\Point $value
+ * @return \routeguide\Feature
*/
- public function setLocation(\examples\Point $value){
+ public function setLocation(\routeguide\Point $value){
return $this->_set(2, $value);
}
}
}
-namespace examples {
+namespace routeguide {
class RouteNote extends \DrSlump\Protobuf\Message {
- /** @var \examples\Point */
+ /** @var \routeguide\Point */
public $location = null;
/** @var string */
@@ -375,7 +375,7 @@ namespace examples {
public static function descriptor()
{
- $descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'examples.RouteNote');
+ $descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'routeguide.RouteNote');
// OPTIONAL MESSAGE location = 1
$f = new \DrSlump\Protobuf\Field();
@@ -383,7 +383,7 @@ namespace examples {
$f->name = "location";
$f->type = \DrSlump\Protobuf::TYPE_MESSAGE;
$f->rule = \DrSlump\Protobuf::RULE_OPTIONAL;
- $f->reference = '\examples\Point';
+ $f->reference = '\routeguide\Point';
$descriptor->addField($f);
// OPTIONAL STRING message = 2
@@ -413,7 +413,7 @@ namespace examples {
/**
* Clear <location> value
*
- * @return \examples\RouteNote
+ * @return \routeguide\RouteNote
*/
public function clearLocation(){
return $this->_clear(1);
@@ -422,7 +422,7 @@ namespace examples {
/**
* Get <location> value
*
- * @return \examples\Point
+ * @return \routeguide\Point
*/
public function getLocation(){
return $this->_get(1);
@@ -431,10 +431,10 @@ namespace examples {
/**
* Set <location> value
*
- * @param \examples\Point $value
- * @return \examples\RouteNote
+ * @param \routeguide\Point $value
+ * @return \routeguide\RouteNote
*/
- public function setLocation(\examples\Point $value){
+ public function setLocation(\routeguide\Point $value){
return $this->_set(1, $value);
}
@@ -450,7 +450,7 @@ namespace examples {
/**
* Clear <message> value
*
- * @return \examples\RouteNote
+ * @return \routeguide\RouteNote
*/
public function clearMessage(){
return $this->_clear(2);
@@ -469,7 +469,7 @@ namespace examples {
* Set <message> value
*
* @param string $value
- * @return \examples\RouteNote
+ * @return \routeguide\RouteNote
*/
public function setMessage( $value){
return $this->_set(2, $value);
@@ -477,7 +477,7 @@ namespace examples {
}
}
-namespace examples {
+namespace routeguide {
class RouteSummary extends \DrSlump\Protobuf\Message {
@@ -499,7 +499,7 @@ namespace examples {
public static function descriptor()
{
- $descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'examples.RouteSummary');
+ $descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'routeguide.RouteSummary');
// OPTIONAL INT32 point_count = 1
$f = new \DrSlump\Protobuf\Field();
@@ -556,7 +556,7 @@ namespace examples {
/**
* Clear <point_count> value
*
- * @return \examples\RouteSummary
+ * @return \routeguide\RouteSummary
*/
public function clearPointCount(){
return $this->_clear(1);
@@ -575,7 +575,7 @@ namespace examples {
* Set <point_count> value
*
* @param int $value
- * @return \examples\RouteSummary
+ * @return \routeguide\RouteSummary
*/
public function setPointCount( $value){
return $this->_set(1, $value);
@@ -593,7 +593,7 @@ namespace examples {
/**
* Clear <feature_count> value
*
- * @return \examples\RouteSummary
+ * @return \routeguide\RouteSummary
*/
public function clearFeatureCount(){
return $this->_clear(2);
@@ -612,7 +612,7 @@ namespace examples {
* Set <feature_count> value
*
* @param int $value
- * @return \examples\RouteSummary
+ * @return \routeguide\RouteSummary
*/
public function setFeatureCount( $value){
return $this->_set(2, $value);
@@ -630,7 +630,7 @@ namespace examples {
/**
* Clear <distance> value
*
- * @return \examples\RouteSummary
+ * @return \routeguide\RouteSummary
*/
public function clearDistance(){
return $this->_clear(3);
@@ -649,7 +649,7 @@ namespace examples {
* Set <distance> value
*
* @param int $value
- * @return \examples\RouteSummary
+ * @return \routeguide\RouteSummary
*/
public function setDistance( $value){
return $this->_set(3, $value);
@@ -667,7 +667,7 @@ namespace examples {
/**
* Clear <elapsed_time> value
*
- * @return \examples\RouteSummary
+ * @return \routeguide\RouteSummary
*/
public function clearElapsedTime(){
return $this->_clear(4);
@@ -686,7 +686,7 @@ namespace examples {
* Set <elapsed_time> value
*
* @param int $value
- * @return \examples\RouteSummary
+ * @return \routeguide\RouteSummary
*/
public function setElapsedTime( $value){
return $this->_set(4, $value);
@@ -694,38 +694,36 @@ namespace examples {
}
}
-namespace examples {
+namespace routeguide {
- class RouteGuideClient{
+ class RouteGuideClient extends \Grpc\BaseStub {
- private $rpc_impl;
-
- public function __construct($rpc_impl) {
- $this->rpc_impl = $rpc_impl;
+ public function __construct($hostname, $opts) {
+ parent::__construct($hostname, $opts);
}
/**
- * @param examples\Point $input
+ * @param routeguide\Point $input
*/
- public function GetFeature(\examples\Point $argument, $metadata = array()) {
- return $this->rpc_impl->_simpleRequest('/examples.RouteGuide/GetFeature', $argument, '\examples\Feature::deserialize', $metadata);
+ public function GetFeature(\routeguide\Point $argument, $metadata = array(), $options = array()) {
+ return $this->_simpleRequest('/routeguide.RouteGuide/GetFeature', $argument, '\routeguide\Feature::deserialize', $metadata, $options);
}
/**
- * @param examples\Rectangle $input
+ * @param routeguide\Rectangle $input
*/
- public function ListFeatures($argument, $metadata = array()) {
- return $this->rpc_impl->_serverStreamRequest('/examples.RouteGuide/ListFeatures', $argument, '\examples\Feature::deserialize', $metadata);
+ public function ListFeatures($argument, $metadata = array(), $options = array()) {
+ return $this->_serverStreamRequest('/routeguide.RouteGuide/ListFeatures', $argument, '\routeguide\Feature::deserialize', $metadata, $options);
}
/**
- * @param examples\Point $input
+ * @param routeguide\Point $input
*/
- public function RecordRoute($arguments, $metadata = array()) {
- return $this->rpc_impl->_clientStreamRequest('/examples.RouteGuide/RecordRoute', $arguments, '\examples\RouteSummary::deserialize', $metadata);
+ public function RecordRoute($metadata = array()) {
+ return $this->_clientStreamRequest('/routeguide.RouteGuide/RecordRoute', '\routeguide\RouteSummary::deserialize', $metadata);
}
/**
- * @param examples\RouteNote $input
+ * @param routeguide\RouteNote $input
*/
public function RouteChat($metadata = array()) {
- return $this->rpc_impl->_bidiRequest('/examples.RouteGuide/RouteChat', '\examples\RouteNote::deserialize', $metadata);
+ return $this->_bidiRequest('/routeguide.RouteGuide/RouteChat', '\routeguide\RouteNote::deserialize', $metadata);
}
}
}
diff --git a/examples/php/route_guide/route_guide.proto b/examples/php/route_guide/route_guide.proto
index 0947184dbb..d50f8a5169 100644
--- a/examples/php/route_guide/route_guide.proto
+++ b/examples/php/route_guide/route_guide.proto
@@ -31,7 +31,7 @@ syntax = "proto2";
option java_package = "io.grpc.examples";
-package examples;
+package routeguide;
// Interface exported by the server.
service RouteGuide {
diff --git a/examples/php/route_guide/route_guide_client.php b/examples/php/route_guide/route_guide_client.php
index 6d9ae58b66..d21a080995 100644
--- a/examples/php/route_guide/route_guide_client.php
+++ b/examples/php/route_guide/route_guide_client.php
@@ -37,7 +37,7 @@ require dirname(__FILE__) . '/route_guide.php';
define('COORD_FACTOR', 1e7);
-$client = new examples\RouteGuideClient(
+$client = new routeguide\RouteGuideClient(
new Grpc\BaseStub('localhost:50051', []));
function printFeature($feature) {
@@ -60,7 +60,7 @@ function runGetFeature() {
print "Running GetFeature...\n";
global $client;
- $point = new examples\Point();
+ $point = new routeguide\Point();
$points = array(
array(409146138, -746188906),
array(0, 0),
@@ -84,15 +84,15 @@ function runListFeatures() {
print "Running ListFeatures...\n";
global $client;
- $lo_point = new examples\Point();
- $hi_point = new examples\Point();
+ $lo_point = new routeguide\Point();
+ $hi_point = new routeguide\Point();
$lo_point->setLatitude(400000000);
$lo_point->setLongitude(-750000000);
$hi_point->setLatitude(420000000);
$hi_point->setLongitude(-730000000);
- $rectangle = new examples\Rectangle();
+ $rectangle = new routeguide\Rectangle();
$rectangle->setLo($lo_point);
$rectangle->setHi($hi_point);
@@ -118,7 +118,7 @@ function runRecordRoute() {
$num_points_in_db = count($db);
$num_points = 10;
for ($i = 0; $i < $num_points; $i++) {
- $point = new examples\Point();
+ $point = new routeguide\Point();
$index = rand(0, $num_points_in_db - 1);
$lat = $db[$index]['location']['latitude'];
$long = $db[$index]['location']['longitude'];
@@ -163,11 +163,11 @@ function runRouteChat() {
);
foreach ($notes as $n) {
- $point = new examples\Point();
+ $point = new routeguide\Point();
$point->setLatitude($lat = $n[0]);
$point->setLongitude($long = $n[1]);
- $route_note = new examples\RouteNote();
+ $route_note = new routeguide\RouteNote();
$route_note->setLocation($point);
$route_note->setMessage($message = $n[2]);
diff --git a/examples/protos/route_guide.proto b/examples/protos/route_guide.proto
index bfde5f1ead..7a70040e1c 100644
--- a/examples/protos/route_guide.proto
+++ b/examples/protos/route_guide.proto
@@ -32,7 +32,7 @@ syntax = "proto3";
option java_package = "ex.grpc";
option objc_class_prefix = "RTG";
-package examples;
+package routeguide;
// Interface exported by the server.
service RouteGuide {
diff --git a/examples/python/helloworld/README.md b/examples/python/helloworld/README.md
index d199c401ec..8fde0d2315 100644
--- a/examples/python/helloworld/README.md
+++ b/examples/python/helloworld/README.md
@@ -1,6 +1,6 @@
# gRPC Python Hello World
-This is a quick introduction with a simple example and installation instructions: for a more complete tutorial see [gRPC Basics: Python](examples/python/route_guide).
+This is a quick introduction with a simple example and installation instructions: for a more complete tutorial see [gRPC Basics: Python](../route_guide).
### Install gRPC
Make sure you have built gRPC Python from source on your system. Follow the instructions here:
@@ -96,7 +96,7 @@ been generated for you (helloworld_pb2.py).
### The client
-Client-side code can be found in [greeter_client.py](examples/python/helloworld/greeter_client.py).
+Client-side code can be found in [greeter_client.py](greeter_client.py).
You can run the client using:
@@ -107,7 +107,7 @@ $ ./run_client.sh
### The server
-Server side code can be found in [greeter_server.py](examples/python/helloworld/greeter_server.py).
+Server side code can be found in [greeter_server.py](greeter_server.py).
You can run the server using:
diff --git a/examples/python/route_guide/README.md b/examples/python/route_guide/README.md
index dc97892ea5..636e134964 100644
--- a/examples/python/route_guide/README.md
+++ b/examples/python/route_guide/README.md
@@ -19,7 +19,7 @@ With gRPC you can define your service once in a .proto file and implement client
## Example code and setup
-The example code for this tutorial is in [examples/python/route_guide](examples/python/route_guide). To download the example, clone this repository by running the following command:
+The example code for this tutorial is in [examples/python/route_guide](.). To download the example, clone this repository by running the following command:
```shell
$ git clone https://github.com/grpc/grpc.git
```
@@ -29,11 +29,11 @@ Then change your current directory to `examples/python/route_guide`:
$ cd examples/python/route_guide
```
-You also should have the relevant tools installed to generate the server and client interface code - if you don't already, follow the setup instructions in [the Python quick start guide](examples/python).
+You also should have the relevant tools installed to generate the server and client interface code - if you don't already, follow the setup instructions in [the Python quick start guide](../python).
## Defining the service
-Your first step (as you'll know from [Getting started](https://github.com/grpc/grpc/tree/master/examples)) is to define the gRPC *service* and the method *request* and *response* types using [protocol buffers](https://developers.google.com/protocol-buffers/docs/overview). You can see the complete .proto file in [`examples/protos/route_guide.proto`](examples/protos/route_guide.proto).
+Your first step (as you'll know from [Getting started](https://github.com/grpc/grpc/tree/master/examples)) is to define the gRPC *service* and the method *request* and *response* types using [protocol buffers](https://developers.google.com/protocol-buffers/docs/overview). You can see the complete .proto file in [`examples/protos/route_guide.proto`](../../protos/route_guide.proto).
To define a service, you specify a named `service` in your .proto file:
@@ -115,7 +115,7 @@ Creating and running a `RouteGuide` server breaks down into two work items:
- Implementing the servicer interface generated from our service definition with functions that perform the actual "work" of the service.
- Running a gRPC server to listen for requests from clients and transmit responses.
-You can find the example `RouteGuide` server in [examples/python/route_guide/route_guide_server.py](examples/python/route_guide/route_guide_server.py).
+You can find the example `RouteGuide` server in [route_guide_server.py](route_guide_server.py).
### Implementing RouteGuide
@@ -222,7 +222,7 @@ Because `start()` does not block you may need to sleep-loop if there is nothing
<a name="client"></a>
## Creating the client
-You can see the complete example client code in [examples/python/route_guide/route_guide_client.py](examples/python/route_guide/route_guide_client.py).
+You can see the complete example client code in [route_guide_client.py](route_guide_client.py).
### Creating a stub
diff --git a/examples/ruby/README.md b/examples/ruby/README.md
index dc21f5dd49..36f3527006 100644
--- a/examples/ruby/README.md
+++ b/examples/ruby/README.md
@@ -55,7 +55,7 @@ Try it!
Tutorial
--------
-You can find a more detailed tutorial in [gRPC Basics: Ruby](examples/ruby/route_guide/README.md)
+You can find a more detailed tutorial in [gRPC Basics: Ruby](route_guide/README.md)
-[helloworld.proto]:examples/protos/helloworld.proto
+[helloworld.proto]:../protos/helloworld.proto
[RVM]:https://www.rvm.io/
diff --git a/examples/ruby/route_guide/README.md b/examples/ruby/route_guide/README.md
index c7231fb43f..77e93d8bd4 100644
--- a/examples/ruby/route_guide/README.md
+++ b/examples/ruby/route_guide/README.md
@@ -18,7 +18,7 @@ With gRPC we can define our service once in a .proto file and implement clients
## Example code and setup
-The example code for our tutorial is in [examples/ruby/route_guide](examples/ruby/route_guide). To download the example, clone this repository by running the following command:
+The example code for our tutorial is in [examples/ruby/route_guide](.). To download the example, clone this repository by running the following command:
```shell
$ git clone https://github.com/grpc/grpc.git
```
@@ -28,12 +28,12 @@ Then change your current directory to `examples/ruby/route_guide`:
$ cd examples/ruby/route_guide
```
-You also should have the relevant tools installed to generate the server and client interface code - if you don't already, follow the setup instructions in [the Ruby quick start guide](examples/ruby).
+You also should have the relevant tools installed to generate the server and client interface code - if you don't already, follow the setup instructions in [the Ruby quick start guide](..).
## Defining the service
-Our first step (as you'll know from [Getting started](https://github.com/grpc/grpc/tree/master/examples)) is to define the gRPC *service* and the method *request* and *response* types using [protocol buffers] (https://developers.google.com/protocol-buffers/docs/overview). You can see the complete .proto file in [`examples/protos/route_guide.proto`](examples/protos/route_guide.proto).
+Our first step (as you'll know from [Getting started](https://github.com/grpc/grpc/tree/master/examples)) is to define the gRPC *service* and the method *request* and *response* types using [protocol buffers] (https://developers.google.com/protocol-buffers/docs/overview). You can see the complete .proto file in [`examples/protos/route_guide.proto`](../../route_guide.proto).
To define a service, you specify a named `service` in your .proto file:
@@ -116,7 +116,7 @@ There are two parts to making our `RouteGuide` service do its job:
- Implementing the service interface generated from our service definition: doing the actual "work" of our service.
- Running a gRPC server to listen for requests from clients and return the service responses.
-You can find our example `RouteGuide` server in [examples/ruby/route_guide/route_guide_server.rb](examples/ruby/route_guide/route_guide_server.rb). Let's take a closer look at how it works.
+You can find our example `RouteGuide` server in [route_guide_server.rb](route_guide_server.rb). Let's take a closer look at how it works.
### Implementing RouteGuide
@@ -199,7 +199,7 @@ As you can see, we build and start our server using a `GRPC::RpcServer`. To do t
<a name="client"></a>
## Creating the client
-In this section, we'll look at creating a Ruby client for our `RouteGuide` service. You can see our complete example client code in [examples/ruby/route_guide/route_guide_client.rb](examples/ruby/route_guide/route_guide_client.rb).
+In this section, we'll look at creating a Ruby client for our `RouteGuide` service. You can see our complete example client code in [route_guide_client.rb](route_guide_client.rb).
### Creating a stub
diff --git a/gRPC.podspec b/gRPC.podspec
index 0349d04c6a..d0e1e2d848 100644
--- a/gRPC.podspec
+++ b/gRPC.podspec
@@ -247,8 +247,9 @@ Pod::Spec.new do |s|
'src/core/transport/stream_op.h',
'src/core/transport/transport.h',
'src/core/transport/transport_impl.h',
+ 'src/core/census/aggregation.h',
'src/core/census/context.h',
- 'src/core/census/rpc_stat_id.h',
+ 'src/core/census/rpc_metric_id.h',
'grpc/grpc_security.h',
'grpc/byte_buffer.h',
'grpc/byte_buffer_reader.h',
@@ -396,7 +397,6 @@ Pod::Spec.new do |s|
'src/core/census/context.c',
'src/core/census/initialize.c',
'src/core/census/operation.c',
- 'src/core/census/record_stat.c',
'src/core/census/tracing.c'
ss.private_header_files = 'src/core/support/env.h',
@@ -521,8 +521,9 @@ Pod::Spec.new do |s|
'src/core/transport/stream_op.h',
'src/core/transport/transport.h',
'src/core/transport/transport_impl.h',
+ 'src/core/census/aggregation.h',
'src/core/census/context.h',
- 'src/core/census/rpc_stat_id.h'
+ 'src/core/census/rpc_metric_id.h'
ss.header_mappings_dir = '.'
diff --git a/include/grpc/census.h b/include/grpc/census.h
index d1a2978bd2..2f36665d46 100644
--- a/include/grpc/census.h
+++ b/include/grpc/census.h
@@ -379,16 +379,107 @@ int census_tag_set_next(census_tag_set_iterator *it, census_tag_const *tag);
invalidated, and should not be used once close is called. */
void census_tag_set_close(census_tag_set_iterator *it);
-/* A census statistic to be recorded comprises two parts: an ID for the
- * particular statistic and the value to be recorded against it. */
+/* Core stats collection API's. The following concepts are used:
+ * Aggregation: A collection of values. Census supports the following
+ aggregation types:
+ Sum - a single summation type. Typically used for keeping (e.g.)
+ counts of events.
+ Distribution - statistical distribution information, used for
+ recording average, standard deviation etc.
+ Histogram - a histogram of measurements falling in defined bucket
+ boundaries.
+ Window - a count of events that happen in reolling time window.
+ New aggregation types can be added by the user, if desired (see
+ census_register_aggregation()).
+ * Metric: Each measurement is for a single metric. Examples include RPC
+ latency, CPU seconds consumed, and bytes transmitted.
+ * View: A view is a combination of a metric, a tag set (in which the tag
+ values are regular expressions) and a set of aggregations. When a
+ measurement for a metric matches the view tags, it is recorded (for each
+ unique set of tags) against each aggregation. Each metric can have an
+ arbitrary number of views by which it will be broken down.
+*/
+
+/* A single value to be recorded comprises two parts: an ID for the particular
+ * metric and the value to be recorded against it. */
typedef struct {
- int id;
+ gpr_uint32 metric_id;
double value;
-} census_stat;
+} census_value;
+
+/* Record new usage values against the given context. */
+void census_record_values(census_context *context, census_value *values,
+ size_t nvalues);
+
+/** Type representing a particular aggregation */
+typedef struct census_aggregation_ops census_aggregation_ops;
+
+/* Predefined aggregation types, for use with census_view_create(). */
+extern census_aggregation_ops census_agg_sum;
+extern census_aggregation_ops census_agg_distribution;
+extern census_aggregation_ops census_agg_histogram;
+extern census_aggregation_ops census_agg_window;
+
+/** Information needed to instantiate a new aggregation. Used in view
+ construction via census_define_view(). */
+typedef struct {
+ const census_aggregation_ops *ops;
+ const void
+ *create_arg; /* Argument to be used for aggregation initialization. */
+} census_aggregation;
+
+/** A census view type. Opaque. */
+typedef struct census_view census_view;
+
+/** Create a new view.
+ @param metric_id Metric with which this view is associated.
+ @param tags tags that define the view
+ @param aggregations aggregations to associate with the view
+ @param naggregations number of aggregations
+
+ @return A new census view
+*/
+census_view *census_view_create(gpr_uint32 metric_id,
+ const census_tag_set *tags,
+ const census_aggregation *aggregations,
+ size_t naggregations);
+
+/** Destroy a previously created view. */
+void census_view_delete(census_view *view);
+
+/** Metric ID associated with a view */
+size_t census_view_metric(const census_view *view);
+
+/** Number of aggregations associated with view. */
+size_t census_view_naggregations(const census_view *view);
+
+/** Get tags associated with view. */
+const census_tag_set *census_view_tags(const census_view *view);
+
+/** Get aggregation descriptors associated with a view. */
+const census_aggregation *census_view_aggregrations(const census_view *view);
+
+/** Holds all the aggregation data for a particular view instantiation. Forms
+ part of the data returned by census_view_data(). */
+typedef struct {
+ const census_tag_set *tags; /* Tags for this set of aggregations. */
+ const void **data; /* One data set for every aggregation in the view. */
+} census_view_aggregation_data;
+
+/** Census view data as returned by census_view_get_data(). */
+typedef struct {
+ size_t n_tag_sets; /* Number of unique tag sets that matched view. */
+ const census_view_aggregation_data *data; /* n_tag_sets entries */
+} census_view_data;
+
+/** Get data from aggregations associated with a view.
+ @param view View from which to get data.
+ @return Full set of data for all aggregations for the view.
+*/
+const census_view_data *census_view_get_data(const census_view *view);
-/* Record new stats against the given context. */
-void census_record_stat(census_context *context, census_stat *stats,
- size_t nstats);
+/** Reset all view data to zero for the specified view */
+void census_view_reset(census_view *view);
#ifdef __cplusplus
}
diff --git a/src/core/census/record_stat.c b/src/core/census/aggregation.h
index 3dd918618b..e9bc6ada96 100644
--- a/src/core/census/record_stat.c
+++ b/src/core/census/aggregation.h
@@ -31,8 +31,36 @@
*
*/
-#include <grpc/census.h>
-#include "src/core/census/rpc_stat_id.h"
+#include <stddef.h>
-void census_record_stat(census_context *context, census_stat *stats,
- size_t nstats) {}
+#ifndef GRPC_INTERNAL_CORE_CENSUS_AGGREGATION_H
+#define GRPC_INTERNAL_CORE_CENSUS_AGGREGATION_H
+
+/** Structure used to describe an aggregation type. */
+struct census_aggregation_ops {
+ /* Create a new aggregation. The pointer returned can be used in future calls
+ to clone(), free(), record(), data() and reset(). */
+ void *(*create)(const void *create_arg);
+ /* Make a copy of an aggregation created by create() */
+ void *(*clone)(const void *aggregation);
+ /* Destroy an aggregation created by create() */
+ void (*free)(void *aggregation);
+ /* Record a new value against aggregation. */
+ void (*record)(void *aggregation, double value);
+ /* Return current aggregation data. The caller must cast this object into
+ the correct type for the aggregation result. The object returned can be
+ freed by using free_data(). */
+ void *(*data)(const void *aggregation);
+ /* free data returned by data() */
+ void (*free_data)(void *data);
+ /* Reset an aggregation to default (zero) values. */
+ void (*reset)(void *aggregation);
+ /* Merge 'from' aggregation into 'to'. Both aggregations must be compatible */
+ void (*merge)(void *to, const void *from);
+ /* Fill buffer with printable string version of aggregation contents. For
+ debugging only. Returns the number of bytes added to buffer (a value == n
+ implies the buffer was of insufficient size). */
+ size_t (*print)(const void *aggregation, char *buffer, size_t n);
+};
+
+#endif /* GRPC_INTERNAL_CORE_CENSUS_AGGREGATION_H */
diff --git a/src/core/census/grpc_filter.c b/src/core/census/grpc_filter.c
index b78445595c..e01c9a2ad4 100644
--- a/src/core/census/grpc_filter.c
+++ b/src/core/census/grpc_filter.c
@@ -36,7 +36,7 @@
#include <stdio.h>
#include <string.h>
-#include "src/core/census/rpc_stat_id.h"
+#include "include/grpc/census.h"
#include "src/core/channel/channel_stack.h"
#include "src/core/channel/noop_filter.h"
#include "src/core/statistics/census_interface.h"
@@ -173,25 +173,15 @@ static void destroy_channel_elem(grpc_channel_element* elem) {
}
const grpc_channel_filter grpc_client_census_filter = {
- client_start_transport_op,
- grpc_channel_next_op,
- sizeof(call_data),
- client_init_call_elem,
- client_destroy_call_elem,
- sizeof(channel_data),
- init_channel_elem,
- destroy_channel_elem,
- grpc_call_next_get_peer,
- "census-client"};
+ client_start_transport_op, grpc_channel_next_op,
+ sizeof(call_data), client_init_call_elem,
+ client_destroy_call_elem, sizeof(channel_data),
+ init_channel_elem, destroy_channel_elem,
+ grpc_call_next_get_peer, "census-client"};
const grpc_channel_filter grpc_server_census_filter = {
- server_start_transport_op,
- grpc_channel_next_op,
- sizeof(call_data),
- server_init_call_elem,
- server_destroy_call_elem,
- sizeof(channel_data),
- init_channel_elem,
- destroy_channel_elem,
- grpc_call_next_get_peer,
- "census-server"};
+ server_start_transport_op, grpc_channel_next_op,
+ sizeof(call_data), server_init_call_elem,
+ server_destroy_call_elem, sizeof(channel_data),
+ init_channel_elem, destroy_channel_elem,
+ grpc_call_next_get_peer, "census-server"};
diff --git a/src/core/census/rpc_stat_id.h b/src/core/census/rpc_metric_id.h
index fc0aa6f43f..1d8e8806f5 100644
--- a/src/core/census/rpc_stat_id.h
+++ b/src/core/census/rpc_metric_id.h
@@ -31,16 +31,21 @@
*
*/
-#ifndef CENSUS_RPC_STAT_ID_H
-#define CENSUS_RPC_STAT_ID_H
+#ifndef CENSUS_RPC_METRIC_ID_H
+#define CENSUS_RPC_METRIC_ID_H
-/* Stats ID's used for RPC measurements. */
-#define CENSUS_INVALID_STAT_ID 0 /* ID 0 is always invalid */
-#define CENSUS_RPC_CLIENT_REQUESTS 1 /* Count of client requests sent. */
-#define CENSUS_RPC_SERVER_REQUESTS 2 /* Count of server requests sent. */
-#define CENSUS_RPC_CLIENT_ERRORS 3 /* Client error counts. */
-#define CENSUS_RPC_SERVER_ERRORS 4 /* Server error counts. */
-#define CENSUS_RPC_CLIENT_LATENCY 5 /* Client side request latency. */
-#define CENSUS_RPC_SERVER_LATENCY 6 /* Server side request latency. */
+/* Metric ID's used for RPC measurements. */
+/* Count of client requests sent. */
+#define CENSUS_METRIC_RPC_CLIENT_REQUESTS ((gpr_uint32)0)
+/* Count of server requests sent. */
+#define CENSUS_METRIC_RPC_SERVER_REQUESTS ((gpr_uint32)1)
+/* Client error counts. */
+#define CENSUS_METRIC_RPC_CLIENT_ERRORS ((gpr_uint32)2)
+/* Server error counts. */
+#define CENSUS_METRIC_RPC_SERVER_ERRORS ((gpr_uint32)3)
+/* Client side request latency. */
+#define CENSUS_METRIC_RPC_CLIENT_LATENCY ((gpr_uint32)4)
+/* Server side request latency. */
+#define CENSUS_METRIC_RPC_SERVER_LATENCY ((gpr_uint32)5)
-#endif /* CENSUS_RPC_STAT_ID_H */
+#endif /* CENSUS_RPC_METRIC_ID_H */
diff --git a/src/node/README.md b/src/node/README.md
index c96bc96642..0b97680feb 100644
--- a/src/node/README.md
+++ b/src/node/README.md
@@ -1,7 +1,7 @@
# Node.js gRPC Library
## Status
-Alpha : Ready for early adopters
+Beta
## PREREQUISITES
- `node`: This requires `node` to be installed. If you instead have the `nodejs` executable on Debian, you should install the [`nodejs-legacy`](https://packages.debian.org/sid/nodejs-legacy) package.
diff --git a/src/node/package.json b/src/node/package.json
index 756d41b0af..bb8987cc0d 100644
--- a/src/node/package.json
+++ b/src/node/package.json
@@ -1,6 +1,6 @@
{
"name": "grpc",
- "version": "0.10.0",
+ "version": "0.11.0",
"author": "Google Inc.",
"description": "gRPC Library for Node",
"homepage": "http://www.grpc.io/",
diff --git a/src/objective-c/generated_libraries/RouteGuideClient/route_guide.proto b/src/objective-c/generated_libraries/RouteGuideClient/route_guide.proto
index dace1a5d26..19592e2ebd 100644
--- a/src/objective-c/generated_libraries/RouteGuideClient/route_guide.proto
+++ b/src/objective-c/generated_libraries/RouteGuideClient/route_guide.proto
@@ -29,7 +29,7 @@
syntax = "proto3";
-package examples;
+package routeguide;
option objc_class_prefix = "RGD";
diff --git a/src/objective-c/tests/LocalClearTextTests.m b/src/objective-c/tests/LocalClearTextTests.m
index d01fe91afa..976fff55bc 100644
--- a/src/objective-c/tests/LocalClearTextTests.m
+++ b/src/objective-c/tests/LocalClearTextTests.m
@@ -47,7 +47,7 @@
// instructions at https://github.com/grpc/homebrew-grpc
static NSString * const kRouteGuideHost = @"http://localhost:50051";
-static NSString * const kPackage = @"examples";
+static NSString * const kPackage = @"routeguide";
static NSString * const kService = @"RouteGuide";
@interface LocalClearTextTests : XCTestCase
diff --git a/src/ruby/.rspec b/src/ruby/.rspec
index 2320752db4..efeee2c1d2 100755
--- a/src/ruby/.rspec
+++ b/src/ruby/.rspec
@@ -1,5 +1,6 @@
-I.
-Ipb
+--backtrace
--require spec_helper
--format documentation
--color
diff --git a/src/ruby/grpc.gemspec b/src/ruby/grpc.gemspec
index 20a6206e7e..093606bb8b 100755
--- a/src/ruby/grpc.gemspec
+++ b/src/ruby/grpc.gemspec
@@ -14,7 +14,7 @@ Gem::Specification.new do |s|
s.license = 'BSD-3-Clause'
s.required_ruby_version = '>= 2.0.0'
- s.requirements << 'libgrpc ~> 0.10.0 needs to be installed'
+ s.requirements << 'libgrpc ~> 0.11.0 needs to be installed'
s.files = %w( Rakefile )
s.files += Dir.glob('lib/**/*')
diff --git a/src/ruby/lib/grpc/generic/rpc_server.rb b/src/ruby/lib/grpc/generic/rpc_server.rb
index 38ea333413..3740ac52da 100644
--- a/src/ruby/lib/grpc/generic/rpc_server.rb
+++ b/src/ruby/lib/grpc/generic/rpc_server.rb
@@ -417,18 +417,18 @@ module GRPC
begin
an_rpc = @server.request_call(@cq, loop_tag, INFINITE_FUTURE)
c = new_active_server_call(an_rpc)
+ unless c.nil?
+ mth = an_rpc.method.to_sym
+ @pool.schedule(c) do |call|
+ rpc_descs[mth].run_server_method(call, rpc_handlers[mth])
+ end
+ end
rescue Core::CallError, RuntimeError => e
# these might happen for various reasonse. The correct behaviour of
# the server is to log them and continue, if it's not shutting down.
GRPC.logger.warn("server call failed: #{e}") unless stopped?
next
end
- unless c.nil?
- mth = an_rpc.method.to_sym
- @pool.schedule(c) do |call|
- rpc_descs[mth].run_server_method(call, rpc_handlers[mth])
- end
- end
end
@running = false
GRPC.logger.info("stopped: #{self}")
diff --git a/src/ruby/lib/grpc/version.rb b/src/ruby/lib/grpc/version.rb
index 431e8774b5..108c22b25e 100644
--- a/src/ruby/lib/grpc/version.rb
+++ b/src/ruby/lib/grpc/version.rb
@@ -29,5 +29,5 @@
# GRPC contains the General RPC module.
module GRPC
- VERSION = '0.10.0'
+ VERSION = '0.11.0'
end
diff --git a/src/ruby/spec/client_server_spec.rb b/src/ruby/spec/client_server_spec.rb
index 387f2baec2..ad0fb26896 100644
--- a/src/ruby/spec/client_server_spec.rb
+++ b/src/ruby/spec/client_server_spec.rb
@@ -28,7 +28,6 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
require 'grpc'
-require 'spec_helper'
include GRPC::Core
@@ -41,7 +40,7 @@ shared_context 'setup: tags' do
end
def deadline
- Time.now + 2
+ Time.now + 5
end
def server_allows_client_to_proceed
diff --git a/src/ruby/spec/pb/health/checker_spec.rb b/src/ruby/spec/pb/health/checker_spec.rb
index d7b7535cbe..9bc82638c7 100644
--- a/src/ruby/spec/pb/health/checker_spec.rb
+++ b/src/ruby/spec/pb/health/checker_spec.rb
@@ -179,7 +179,6 @@ describe Grpc::Health::Checker do
describe 'running on RpcServer' do
RpcServer = GRPC::RpcServer
- StatusCodes = GRPC::Core::StatusCodes
CheckerStub = Grpc::Health::Checker.rpc_stub_class
before(:each) do
diff --git a/tools/doxygen/Doxyfile.core.internal b/tools/doxygen/Doxyfile.core.internal
index 0b7f89ffdd..729f8bf2ff 100644
--- a/tools/doxygen/Doxyfile.core.internal
+++ b/tools/doxygen/Doxyfile.core.internal
@@ -881,8 +881,9 @@ src/core/transport/metadata.h \
src/core/transport/stream_op.h \
src/core/transport/transport.h \
src/core/transport/transport_impl.h \
+src/core/census/aggregation.h \
src/core/census/context.h \
-src/core/census/rpc_stat_id.h \
+src/core/census/rpc_metric_id.h \
src/core/httpcli/httpcli_security_connector.c \
src/core/security/base64.c \
src/core/security/client_auth_filter.c \
@@ -1023,7 +1024,6 @@ src/core/transport/transport_op_string.c \
src/core/census/context.c \
src/core/census/initialize.c \
src/core/census/operation.c \
-src/core/census/record_stat.c \
src/core/census/tracing.c \
include/grpc/support/alloc.h \
include/grpc/support/atm.h \
diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json
index 46fb8b28d4..3a94b9ee6b 100644
--- a/tools/run_tests/sources_and_headers.json
+++ b/tools/run_tests/sources_and_headers.json
@@ -12229,9 +12229,10 @@
"include/grpc/grpc.h",
"include/grpc/grpc_security.h",
"include/grpc/status.h",
+ "src/core/census/aggregation.h",
"src/core/census/context.h",
"src/core/census/grpc_filter.h",
- "src/core/census/rpc_stat_id.h",
+ "src/core/census/rpc_metric_id.h",
"src/core/channel/channel_args.h",
"src/core/channel/channel_stack.h",
"src/core/channel/client_channel.h",
@@ -12356,6 +12357,7 @@
"include/grpc/grpc.h",
"include/grpc/grpc_security.h",
"include/grpc/status.h",
+ "src/core/census/aggregation.h",
"src/core/census/context.c",
"src/core/census/context.h",
"src/core/census/grpc_context.c",
@@ -12363,8 +12365,7 @@
"src/core/census/grpc_filter.h",
"src/core/census/initialize.c",
"src/core/census/operation.c",
- "src/core/census/record_stat.c",
- "src/core/census/rpc_stat_id.h",
+ "src/core/census/rpc_metric_id.h",
"src/core/census/tracing.c",
"src/core/channel/channel_args.c",
"src/core/channel/channel_args.h",
@@ -12708,9 +12709,10 @@
"include/grpc/compression.h",
"include/grpc/grpc.h",
"include/grpc/status.h",
+ "src/core/census/aggregation.h",
"src/core/census/context.h",
"src/core/census/grpc_filter.h",
- "src/core/census/rpc_stat_id.h",
+ "src/core/census/rpc_metric_id.h",
"src/core/channel/channel_args.h",
"src/core/channel/channel_stack.h",
"src/core/channel/client_channel.h",
@@ -12821,6 +12823,7 @@
"include/grpc/compression.h",
"include/grpc/grpc.h",
"include/grpc/status.h",
+ "src/core/census/aggregation.h",
"src/core/census/context.c",
"src/core/census/context.h",
"src/core/census/grpc_context.c",
@@ -12828,8 +12831,7 @@
"src/core/census/grpc_filter.h",
"src/core/census/initialize.c",
"src/core/census/operation.c",
- "src/core/census/record_stat.c",
- "src/core/census/rpc_stat_id.h",
+ "src/core/census/rpc_metric_id.h",
"src/core/census/tracing.c",
"src/core/channel/channel_args.c",
"src/core/channel/channel_args.h",
diff --git a/vsprojects/vcxproj/grpc/grpc.vcxproj b/vsprojects/vcxproj/grpc/grpc.vcxproj
index 77f2c77679..852da5d95f 100644
--- a/vsprojects/vcxproj/grpc/grpc.vcxproj
+++ b/vsprojects/vcxproj/grpc/grpc.vcxproj
@@ -343,8 +343,9 @@
<ClInclude Include="..\..\..\src\core\transport\stream_op.h" />
<ClInclude Include="..\..\..\src\core\transport\transport.h" />
<ClInclude Include="..\..\..\src\core\transport\transport_impl.h" />
+ <ClInclude Include="..\..\..\src\core\census\aggregation.h" />
<ClInclude Include="..\..\..\src\core\census\context.h" />
- <ClInclude Include="..\..\..\src\core\census\rpc_stat_id.h" />
+ <ClInclude Include="..\..\..\src\core\census\rpc_metric_id.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\..\src\core\httpcli\httpcli_security_connector.c">
@@ -627,8 +628,6 @@
</ClCompile>
<ClCompile Include="..\..\..\src\core\census\operation.c">
</ClCompile>
- <ClCompile Include="..\..\..\src\core\census\record_stat.c">
- </ClCompile>
<ClCompile Include="..\..\..\src\core\census\tracing.c">
</ClCompile>
</ItemGroup>
diff --git a/vsprojects/vcxproj/grpc/grpc.vcxproj.filters b/vsprojects/vcxproj/grpc/grpc.vcxproj.filters
index 0808f7147a..b334602e02 100644
--- a/vsprojects/vcxproj/grpc/grpc.vcxproj.filters
+++ b/vsprojects/vcxproj/grpc/grpc.vcxproj.filters
@@ -421,9 +421,6 @@
<ClCompile Include="..\..\..\src\core\census\operation.c">
<Filter>src\core\census</Filter>
</ClCompile>
- <ClCompile Include="..\..\..\src\core\census\record_stat.c">
- <Filter>src\core\census</Filter>
- </ClCompile>
<ClCompile Include="..\..\..\src\core\census\tracing.c">
<Filter>src\core\census</Filter>
</ClCompile>
@@ -794,10 +791,13 @@
<ClInclude Include="..\..\..\src\core\transport\transport_impl.h">
<Filter>src\core\transport</Filter>
</ClInclude>
+ <ClInclude Include="..\..\..\src\core\census\aggregation.h">
+ <Filter>src\core\census</Filter>
+ </ClInclude>
<ClInclude Include="..\..\..\src\core\census\context.h">
<Filter>src\core\census</Filter>
</ClInclude>
- <ClInclude Include="..\..\..\src\core\census\rpc_stat_id.h">
+ <ClInclude Include="..\..\..\src\core\census\rpc_metric_id.h">
<Filter>src\core\census</Filter>
</ClInclude>
</ItemGroup>
diff --git a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj
index ff03f20d53..f069aa5225 100644
--- a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj
+++ b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj
@@ -322,8 +322,9 @@
<ClInclude Include="..\..\..\src\core\transport\stream_op.h" />
<ClInclude Include="..\..\..\src\core\transport\transport.h" />
<ClInclude Include="..\..\..\src\core\transport\transport_impl.h" />
+ <ClInclude Include="..\..\..\src\core\census\aggregation.h" />
<ClInclude Include="..\..\..\src\core\census\context.h" />
- <ClInclude Include="..\..\..\src\core\census\rpc_stat_id.h" />
+ <ClInclude Include="..\..\..\src\core\census\rpc_metric_id.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\..\src\core\surface\init_unsecure.c">
@@ -566,8 +567,6 @@
</ClCompile>
<ClCompile Include="..\..\..\src\core\census\operation.c">
</ClCompile>
- <ClCompile Include="..\..\..\src\core\census\record_stat.c">
- </ClCompile>
<ClCompile Include="..\..\..\src\core\census\tracing.c">
</ClCompile>
</ItemGroup>
diff --git a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters
index 7b66d4ae98..35f8599cb9 100644
--- a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters
+++ b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters
@@ -361,9 +361,6 @@
<ClCompile Include="..\..\..\src\core\census\operation.c">
<Filter>src\core\census</Filter>
</ClCompile>
- <ClCompile Include="..\..\..\src\core\census\record_stat.c">
- <Filter>src\core\census</Filter>
- </ClCompile>
<ClCompile Include="..\..\..\src\core\census\tracing.c">
<Filter>src\core\census</Filter>
</ClCompile>
@@ -692,10 +689,13 @@
<ClInclude Include="..\..\..\src\core\transport\transport_impl.h">
<Filter>src\core\transport</Filter>
</ClInclude>
+ <ClInclude Include="..\..\..\src\core\census\aggregation.h">
+ <Filter>src\core\census</Filter>
+ </ClInclude>
<ClInclude Include="..\..\..\src\core\census\context.h">
<Filter>src\core\census</Filter>
</ClInclude>
- <ClInclude Include="..\..\..\src\core\census\rpc_stat_id.h">
+ <ClInclude Include="..\..\..\src\core\census\rpc_metric_id.h">
<Filter>src\core\census</Filter>
</ClInclude>
</ItemGroup>