Skip to content
This repository was archived by the owner on Apr 9, 2021. It is now read-only.

Commit 4d91cc9

Browse files
committed
Merge pull request #60 from stanley-cheung/update_grpc_common_ref
Replace grpc-common references with the new examples locations
2 parents d825579 + 8c233e2 commit 4d91cc9

File tree

18 files changed

+160
-160
lines changed

18 files changed

+160
-160
lines changed

docs/index.md

+65-65
Large diffs are not rendered by default.

docs/installation/c.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -13,21 +13,21 @@ To install gRPC on your system, follow the instructions here:
1313

1414
## Hello C++ gRPC!
1515

16-
Here's how to build and run the C++ implementation of the [Hello World](https://github.com/grpc/grpc-common/blob/master/protos/helloworld.proto) example used in the [Overview](/docs/index.shtml).
16+
Here's how to build and run the C++ implementation of the [Hello World](https://github.com/grpc/grpc/blob/master/examples/protos/helloworld.proto) example used in the [Overview](/docs/index.shtml).
1717

18-
The example code for this and our other examples lives in the `grpc-common`
19-
GitHub repository. Clone this repository to your local machine by running the
18+
The example code for this and our other examples lives in the `examples`
19+
directory. Clone this repository to your local machine by running the
2020
following command:
2121

2222

2323
```sh
24-
$ git clone https://github.com/grpc/grpc-common.git
24+
$ git clone https://github.com/grpc/grpc.git
2525
```
2626

27-
Change your current directory to grpc-common/cpp/helloworld
27+
Change your current directory to examples/cpp/helloworld
2828

2929
```sh
30-
$ cd grpc-common/cpp/helloworld/
30+
$ cd examples/cpp/helloworld/
3131
```
3232

3333

@@ -47,9 +47,9 @@ $ protoc -I ../../protos/ --cpp_out=. ../../protos/helloworld.proto
4747

4848
### Client and server implementations
4949

50-
The client implementation is at [greeter_client.cc](https://github.com/grpc/grpc-common/blob/master/cpp/helloworld/greeter_client.cc).
50+
The client implementation is at [greeter_client.cc](https://github.com/grpc/grpc/blob/master/examples/cpp/helloworld/greeter_client.cc).
5151

52-
The server implementation is at [greeter_server.cc](https://github.com/grpc/grpc-common/blob/master/cpp/helloworld/greeter_server.cc).
52+
The server implementation is at [greeter_server.cc](https://github.com/grpc/grpc/blob/master/examples/cpp/helloworld/greeter_server.cc).
5353

5454
### Try it!
5555
Build client and server:

docs/installation/csharp.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,15 @@ Build
3333

3434
**Windows**
3535

36-
- Clone the [grpc-common](https://github.com/grpc/grpc-common) repository.
36+
- Clone the [grpc](https://github.com/grpc/grpc) repository.
3737

3838
- Open solution `Greeter.sln` with Visual Studio
3939

4040
- Build the solution (this will automatically download NuGet dependencies)
4141

4242
**Linux (Mono)**
4343

44-
- Clone the [grpc-common](https://github.com/grpc/grpc-common) repository.
44+
- Clone the [grpc](https://github.com/grpc/grpc) repository.
4545

4646
- Install gRPC C Core using instructions in [homebrew-grpc](https://github.com/grpc/homebrew-grpc).
4747

docs/installation/go.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,14 @@ $ go get -a github.com/golang/protobuf/protoc-gen-go
3535
- Get the example.
3636

3737
```sh
38-
$ go get -u github.com/grpc/grpc-common/go/greeter_client
39-
$ go get -u github.com/grpc/grpc-common/go/greeter_server
38+
$ go get -u github.com/grpc/grpc-go/examples/helloworld/greeter_client
39+
$ go get -u github.com/grpc/grpc-go/examples/helloworld/greeter_server
4040
```
4141

4242
Try it!
4343
-------
4444

45-
For this sample, we've already generated the server and client stubs from [helloworld.proto](https://github.com/grpc/grpc-common/blob/master/protos/helloworld.proto).
45+
For this sample, we've already generated the server and client stubs from [helloworld.proto](https://github.com/grpc/grpc-go/blob/master/examples/helloworld/proto/helloworld.proto).
4646

4747
- Run the server
4848
```sh
@@ -60,7 +60,7 @@ OPTIONAL - Rebuilding the generated code
6060
You must have protoc and the Go protoc plugin installed to do this:
6161

6262
```sh
63-
$ # from the grpc-common/go dir; invoke protoc
64-
$ protoc -I ../protos ../protos/helloworld.proto --go_out=plugins=grpc:helloworld
63+
$ # from the examples/helloworld dir; invoke protoc
64+
$ protoc -I ../proto ../proto/helloworld.proto --go_out=plugins=grpc:helloworld
6565
```
6666

docs/installation/node.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Install
1818
- Clone this repository
1919

2020
```sh
21-
$ git clone https://github.com/grpc/grpc-common.git
21+
$ git clone https://github.com/grpc/grpc.git
2222
```
2323

2424
- Download the grpc debian packages from the [latest grpc release](https://github.com/grpc/grpc/releases) and install them.
@@ -33,7 +33,7 @@ Install
3333
- Install this package's dependencies
3434

3535
```sh
36-
$ cd grpc-common/node
36+
$ cd examples/node
3737
$ npm install
3838
```
3939

@@ -57,7 +57,7 @@ Try it!
5757
Note
5858
----
5959

60-
The <a href="https://github.com/grpc/grpc-common/tree/master/node">grpc-common/node</a> directory has its own copy of `helloworld.proto` because it currently depends on
60+
The <a href="https://github.com/grpc/grpc/tree/master/examples/node">examples/node</a> directory has its own copy of `helloworld.proto` because it currently depends on
6161
some Protocol Buffer 2.0 syntax that is deprecated in Protocol Buffer 3.0.
6262

6363
Tutorial

docs/installation/objective-c.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -13,21 +13,21 @@ To run this example you should have [Cocoapods](https://cocoapods.org/#install)
1313

1414
## Hello Objective-C gRPC!
1515

16-
Here's how to build and run the Objective-C implementation of the [Hello World](https://github.com/grpc/grpc-common/blob/master/protos/helloworld.proto) example used in the [Overview](/docs/index.html).
16+
Here's how to build and run the Objective-C implementation of the [Hello World](https://github.com/grpc/grpc/blob/master/examples/protos/helloworld.proto) example used in the [Overview](/docs/index.html).
1717

18-
The example code for this and our other examples lives in the `grpc-common`
19-
GitHub repository. Clone this repository to your local machine by running the
18+
The example code for this and our other examples lives in the `examples`
19+
directory. Clone this repository to your local machine by running the
2020
following command:
2121

2222

2323
````
24-
$ git clone https://github.com/grpc/grpc-common.git
24+
$ git clone https://github.com/grpc/grpc.git
2525
```
2626
27-
Change your current directory to `grpc-common/objective-c/helloworld`
27+
Change your current directory to `examples/objective-c/helloworld`
2828
2929
````
30-
$ cd grpc-common/objective-c/helloworld
30+
$ cd examples/objective-c/helloworld
3131
```
3232
3333
### Try it!

docs/installation/php.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,13 @@ INSTALL
2424
- Clone this repository
2525

2626
```sh
27-
$ git clone https://github.com/grpc/grpc-common.git
27+
$ git clone https://github.com/grpc/grpc.git
2828
```
2929

3030
- Install composer
3131

3232
```
33-
$ cd grpc-common/php
33+
$ cd examples/php
3434
$ curl -sS https://getcomposer.org/installer | php
3535
$ php composer.phar install
3636
```
@@ -41,14 +41,14 @@ TRY IT!
4141
- Run a gRPC server. Follow the instruction in [Node][] to run an example server (we only support writing clients in PHP):
4242

4343
```
44-
$ cd grpc-common/node
44+
$ cd examples/node
4545
$ nodejs greeter_server.js
4646
```
4747

4848
- Run the client:
4949

5050
```
51-
$ cd grpc-common/php
51+
$ cd examples/php
5252
$ ./run_greeter_client.sh
5353
```
5454

@@ -64,7 +64,7 @@ Optional - REBUILDING THE GENERATED CODE
6464
The PHP client stub implementation of the proto files can be generated by the [`protoc-gen-php`](https://github.com/datto/protobuf-php) tool. To install the tool:
6565

6666
```sh
67-
$ cd grpc-common/php
67+
$ cd examples/php
6868
$ php composer.phar install
6969
$ cd vendor/datto/protobuf-php
7070
$ gem install rake ronn

docs/installation/python.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,19 @@ have cloned the [gRPC git repo](https://github.com/grpc/grpc).
1717

1818
### Get the source code
1919

20-
The example code for our Hello World and our other examples live in the `grpc-common`
21-
GitHub repository. Clone this repository to your local machine by running the
20+
The example code for our Hello World and our other examples live in the `examples`
21+
directory. Clone this repository to your local machine by running the
2222
following command:
2323

2424

2525
```sh
26-
$ git clone https://github.com/grpc/grpc-common.git
26+
$ git clone https://github.com/grpc/grpc.git
2727
```
2828

29-
Change your current directory to grpc-common/python/helloworld
29+
Change your current directory to examples/python/helloworld
3030

3131
```sh
32-
$ cd grpc-common/python/helloworld/
32+
$ cd examples/python/helloworld/
3333
```
3434

3535
### Defining a service
@@ -45,7 +45,7 @@ types as protocol buffer message types. Both the client and the
4545
server use interface code generated from the service definition.
4646

4747
Here's our example service definition, defined using protocol buffers IDL in
48-
[helloworld.proto](https://github.com/grpc/grpc-common/blob/master/protos/helloworld.proto). The `Greeting`
48+
[helloworld.proto](https://github.com/grpc/grpc/blob/master/examples/protos/helloworld.proto). The `Greeting`
4949
service has one method, `hello`, that lets the server receive a single
5050
`HelloRequest`
5151
message from the remote client containing the user's name, then send back
@@ -102,7 +102,7 @@ been generated for you (helloworld_pb2.py).
102102

103103
### The client
104104

105-
Client-side code can be found in [greeter_client.py](https://github.com/grpc/grpc-common/blob/master/python/helloworld/greeter_client.py).
105+
Client-side code can be found in [greeter_client.py](https://github.com/grpc/grpc/blob/master/examples/python/helloworld/greeter_client.py).
106106

107107
You can run the client using:
108108

@@ -113,7 +113,7 @@ $ ./run_client.sh
113113

114114
### The server
115115

116-
Server side code can be found in [greeter_server.py](https://github.com/grpc/grpc-common/blob/master/python/helloworld/greeter_server.py).
116+
Server side code can be found in [greeter_server.py](https://github.com/grpc/grpc/blob/master/examples/python/helloworld/greeter_server.py).
117117

118118
You can run the server using:
119119

docs/installation/ruby.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ $ # and that the rvm command is installed
2525
Install
2626
-------
2727

28-
- Clone the [grpc-common](https://github.com/grpc/grpc-common) repository, which contains all our examples.
28+
- Clone the [grpc](https://github.com/grpc/grpc) repository, which contains all our examples.
2929
- Use bundler to install the example package's dependencies
3030

3131
```sh
@@ -60,5 +60,5 @@ Tutorial
6060

6161
You can find a more detailed tutorial in [gRPC Basics: Ruby](/docs/tutorials/basic/ruby.html)
6262

63-
[helloworld.proto]:https://github.com/grpc/grpc-common/blob/master/protos/helloworld.proto
63+
[helloworld.proto]:https://github.com/grpc/grpc/blob/master/examples/protos/helloworld.proto
6464
[RVM]:https://www.rvm.io/

docs/tutorials/basic/c.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -27,22 +27,22 @@ With gRPC we can define our service once in a .proto file and implement clients
2727

2828
## Example code and setup
2929

30-
The example code for our tutorial is in [grpc/grpc-common/cpp/route_guide](https://github.com/grpc/grpc-common/tree/master/cpp/route_guide). To download the example, clone the `grpc-common` repository by running the following command:
30+
The example code for our tutorial is in [grpc/grpc/examples/cpp/route_guide](https://github.com/grpc/grpc/tree/master/examples/cpp/route_guide). To download the example, clone the `grpc` repository by running the following command:
3131
```
32-
$ git clone https://github.com/grpc/grpc-common.git
32+
$ git clone https://github.com/grpc/grpc.git
3333
```
3434

35-
Then change your current directory to `grpc-common/cpp/route_guide`:
35+
Then change your current directory to `examples/cpp/route_guide`:
3636
```
37-
$ cd grpc-common/cpp/route_guide
37+
$ cd examples/cpp/route_guide
3838
```
3939

4040
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 C++ quick start guide](/docs/installation/c.html).
4141

4242

4343
## Defining the service
4444

45-
Our first step (as you'll know from the [Overview](/docs/index.html)) 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 [`grpc-common/protos/route_guide.proto`](https://github.com/grpc/grpc-common/blob/master/protos/route_guide.proto).
45+
Our first step (as you'll know from the [Overview](/docs/index.html)) 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`](https://github.com/grpc/grpc/blob/master/examples/protos/route_guide.proto).
4646

4747
To define a service, you specify a named `service` in your .proto file:
4848

@@ -105,7 +105,7 @@ message Point {
105105

106106
Next we need to generate the gRPC client and server interfaces from our .proto service definition. We do this using the protocol buffer compiler `protoc` with a special gRPC C++ plugin.
107107

108-
For simplicity, we've provided a [makefile](https://github.com/grpc/grpc-common/blob/master/cpp/route_guide/Makefile) that runs `protoc` for you with the appropriate plugin, input, and output (if you want to run this yourself, make sure you've installed protoc and followed the gRPC code [installation instructions](https://github.com/grpc/grpc/blob/master/INSTALL) first):
108+
For simplicity, we've provided a [makefile](https://github.com/grpc/grpc/blob/master/examples/cpp/route_guide/Makefile) that runs `protoc` for you with the appropriate plugin, input, and output (if you want to run this yourself, make sure you've installed protoc and followed the gRPC code [installation instructions](https://github.com/grpc/grpc/blob/master/INSTALL) first):
109109

110110
```
111111
$ make route_guide.grpc.pb.cc route_guide.pb.cc
@@ -140,7 +140,7 @@ There are two parts to making our `RouteGuide` service do its job:
140140
- Implementing the service interface generated from our service definition: doing the actual "work" of our service.
141141
- Running a gRPC server to listen for requests from clients and return the service responses.
142142

143-
You can find our example `RouteGuide` server in [grpc-common/cpp/route_guide/route_guide_server.cc](https://github.com/grpc/grpc-common/blob/master/cpp/route_guide/route_guide_server.cc). Let's take a closer look at how it works.
143+
You can find our example `RouteGuide` server in [examples/cpp/route_guide/route_guide_server.cc](https://github.com/grpc/grpc/blob/master/examples/cpp/route_guide/route_guide_server.cc). Let's take a closer look at how it works.
144144

145145
### Implementing RouteGuide
146146

@@ -250,7 +250,7 @@ As you can see, we build and start our server using a `ServerBuilder`. To do thi
250250
<a name="client"></a>
251251
## Creating the client
252252

253-
In this section, we'll look at creating a C++ client for our `RouteGuide` service. You can see our complete example client code in [grpc-common/cpp/route_guide/route_guide_client.cc](https://github.com/grpc/grpc-common/blob/master/cpp/route_guide/route_guide_client.cc).
253+
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/cpp/route_guide/route_guide_client.cc](https://github.com/grpc/grpc/blob/master/examples/cpp/route_guide/route_guide_client.cc).
254254

255255
### Creating a stub
256256

docs/tutorials/basic/csharp.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,13 @@ With gRPC we can define our service once in a .proto file and implement clients
2828

2929
## Example code and setup
3030

31-
The example code for our tutorial is in [grpc/grpc-common/csharp/route_guide](https://github.com/grpc/grpc-common/tree/master/csharp/route_guide). To download the example, clone the `grpc-common` repository by running the following command:
31+
The example code for our tutorial is in [grpc/grpc/examples/csharp/route_guide](https://github.com/grpc/grpc/tree/master/examples/csharp/route_guide). To download the example, clone the `grpc` repository by running the following command:
3232
```shell
33-
$ git clone https://github.com/google/grpc-common.git
33+
$ git clone https://github.com/grpc/grpc.git
3434
```
3535

36-
All the files for this tutorial are in the directory `grpc-common/csharp/route_guide`.
37-
Open the solution `grpc-common/csharp/route_guide/RouteGuide.sln` from Visual Studio (or Monodevelop on Linux).
36+
All the files for this tutorial are in the directory `examples/csharp/route_guide`.
37+
Open the solution `examples/csharp/route_guide/RouteGuide.sln` from Visual Studio (or Monodevelop on Linux).
3838

3939
On Windows, you should not need to do anything besides opening the solution. All the needed dependencies will be restored
4040
for you automatically by the `Grpc` NuGet package upon building the solution.
@@ -44,7 +44,7 @@ able to generate the server and client interface code and run the examples. Foll
4444

4545
## Defining the service
4646

47-
Our first step (as you'll know from the [Overview](/docs/index.html)) 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 [`grpc-common/csharp/route_guide/RouteGuide/protos/route_guide.proto`](https://github.com/grpc/grpc-common/blob/master/sharp/route_guide/RouteGuide/protos/route_guide.proto).
47+
Our first step (as you'll know from the [Overview](/docs/index.html)) 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`](https://github.com/grpc/grpc/blob/master/examples/csharp/route_guide/RouteGuide/protos/route_guide.proto).
4848

4949
To define a service, you specify a named `service` in your .proto file:
5050

@@ -146,7 +146,7 @@ There are two parts to making our `RouteGuide` service do its job:
146146
- Implementing the service interface generated from our service definition: doing the actual "work" of our service.
147147
- Running a gRPC server to listen for requests from clients and return the service responses.
148148

149-
You can find our example `RouteGuide` server in [grpc-common/csharp/route_guide/RouteGuideServer/RouteGuideImpl.cs](https://github.com/grpc/grpc-common/blob/master/csharp/route_guide/RouteGuideServer/RouteGuideServerImpl.cs). Let's take a closer look at how it works.
149+
You can find our example `RouteGuide` server in [examples/csharp/route_guide/RouteGuideServer/RouteGuideImpl.cs](https://github.com/grpc/grpc/blob/master/examples/csharp/route_guide/RouteGuideServer/RouteGuideServerImpl.cs). Let's take a closer look at how it works.
150150

151151
### Implementing RouteGuide
152152

@@ -307,7 +307,7 @@ As you can see, we build and start our server using `Grpc.Core.Server` class. To
307307
<a name="client"></a>
308308
## Creating the client
309309

310-
In this section, we'll look at creating a C# client for our `RouteGuide` service. You can see our complete example client code in [grpc-common/csharp/route_guide/RouteGuideClient/Program.cs](https://github.com/grpc/grpc-common/blob/master/csharp/route_guide/RouteGuideClient/Program.cs).
310+
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](https://github.com/grpc/grpc/blob/master/examples/csharp/route_guide/RouteGuideClient/Program.cs).
311311

312312
### Creating a stub
313313

@@ -411,7 +411,7 @@ Finally, let's look at our bidirectional streaming RPC `RouteChat`. In this case
411411

412412
Build client and server:
413413

414-
- Open the solution `grpc-common/csharp/route_guide/RouteGuide.sln` from Visual Studio (or Monodevelop on Linux) and select **Build**.
414+
- Open the solution `examples/csharp/route_guide/RouteGuide.sln` from Visual Studio (or Monodevelop on Linux) and select **Build**.
415415

416416
- Run the server, which will listen on port 50052:
417417

docs/tutorials/basic/go.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ You also should have the relevant tools installed to generate the server and cli
4242

4343
## Defining the service
4444

45-
Our first step (as you'll know from the [Overview](/docs/index.html)) 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 [`grpc-common/protos/route_guide.proto`](https://github.com/grpc/grpc-common/blob/master/protos/route_guide.proto).
45+
Our first step (as you'll know from the [Overview](/docs/index.html)) 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/helloworld/proto/route_guide.proto`](https://github.com/grpc/grpc-go/blob/master/examples/helloworld/proto/route_guide.proto).
4646

4747
To define a service, you specify a named `service` in your .proto file:
4848

0 commit comments

Comments
 (0)