fix more examples links

pull/3163/head
Stanley Cheung 10 years ago
parent d87e203622
commit 56debcb6d1
  1. 2
      examples/csharp/README.md
  2. 8
      examples/csharp/route_guide/README.md
  3. 10
      examples/node/route_guide/README.md
  4. 6
      examples/objective-c/auth_sample/README.md
  5. 4
      examples/objective-c/helloworld/README.md
  6. 8
      examples/objective-c/route_guide/README.md
  7. 8
      examples/php/route_guide/README.md
  8. 6
      examples/python/helloworld/README.md
  9. 10
      examples/python/route_guide/README.md
  10. 4
      examples/ruby/README.md
  11. 10
      examples/ruby/route_guide/README.md

@ -69,4 +69,4 @@ On Linux or Mac, use `mono GreeterServer.exe` and `mono GreeterClient.exe` to ru
Tutorial 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)

@ -18,7 +18,7 @@ With gRPC we can define our service once in a .proto file and implement clients
## Example code and setup ## 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 ```shell
$ git clone https://github.com/grpc/grpc.git $ 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 ## 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: 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. - 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. - 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 ### 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> <a name="client"></a>
## Creating the client ## 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 ### Creating a stub

@ -17,7 +17,7 @@ With gRPC we can define our service once in a .proto file and implement clients
## Example code and setup ## 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 ```shell
$ git clone https://github.com/grpc/grpc.git $ 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 $ 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 ## 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: 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. - 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. - 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 ### Implementing RouteGuide
@ -244,7 +244,7 @@ As you can see, we build and start our server with the following steps:
<a name="client"></a> <a name="client"></a>
## Creating the client ## 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 ### Creating a stub

@ -9,8 +9,8 @@ headers.
- Read response metadata from a call, which is equivalent to HTTP response headers and trailers. - 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, 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) as shown in the [Hello World](../helloworld)
or [Route Guide](examples/objective-c/route_guide) tutorials, or [Route Guide](../route_guide) tutorials,
and are familiar with OAuth2 concepts like _access token_. and are familiar with OAuth2 concepts like _access token_.
- [Example code and setup](#setup) - [Example code and setup](#setup)
@ -22,7 +22,7 @@ and are familiar with OAuth2 concepts like _access token_.
<a name="setup"></a> <a name="setup"></a>
## Example code and setup ## 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: To download the example, clone this repository by running the following command:
```shell ```shell
$ git clone https://github.com/grpc/grpc.git $ git clone https://github.com/grpc/grpc.git

@ -8,7 +8,7 @@ testing). You can obtain the latter by following [these setup instructions](http
## Hello Objective-C gRPC! ## 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). 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 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 ## 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).

@ -43,7 +43,7 @@ code is limited by the dynamic nature of the language.
<a name="setup"></a> <a name="setup"></a>
## Example code and setup ## 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: To download the example, clone this repository by running the following command:
```shell ```shell
$ git clone https://github.com/grpc/grpc.git $ 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 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). *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: 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 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. 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 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`): 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 ## Creating the client
In this section, we'll look at creating an Objective-C client for our `RouteGuide` service. You can 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 (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). controllers in a single file; it's done here only to simplify the learning process).

@ -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. 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. 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> <a name="setup"></a>
## Example code and setup ## 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 ```shell
$ git clone https://github.com/grpc/grpc.git $ 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> <a name="proto"></a>
## Defining the service ## 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: To define a service, you specify a named `service` in your .proto file:
@ -159,7 +159,7 @@ The file contains:
<a name="client"></a> <a name="client"></a>
## Creating the client ## 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 ### Constructing a client object

@ -1,6 +1,6 @@
# gRPC Python Hello World # 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 ### Install gRPC
Make sure you have built gRPC Python from source on your system. Follow the instructions here: 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 ### 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: You can run the client using:
@ -107,7 +107,7 @@ $ ./run_client.sh
### The server ### 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: You can run the server using:

@ -19,7 +19,7 @@ With gRPC you can define your service once in a .proto file and implement client
## Example code and setup ## 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 ```shell
$ git clone https://github.com/grpc/grpc.git $ 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 $ 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 ## 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: 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. - 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. - 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 ### 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> <a name="client"></a>
## Creating the client ## 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 ### Creating a stub

@ -55,7 +55,7 @@ Try it!
Tutorial 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/ [RVM]:https://www.rvm.io/

@ -18,7 +18,7 @@ With gRPC we can define our service once in a .proto file and implement clients
## Example code and setup ## 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 ```shell
$ git clone https://github.com/grpc/grpc.git $ 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 $ 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 ## 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: 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. - 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. - 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 ### 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> <a name="client"></a>
## Creating the client ## 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 ### Creating a stub

Loading…
Cancel
Save