OSDN Git Service

new repo
[bytom/vapor.git] / vendor / google.golang.org / grpc / examples / route_guide / README.md
1 # Description
2 The route guide server and client demonstrate how to use grpc go libraries to
3 perform unary, client streaming, server streaming and full duplex RPCs.
4
5 Please refer to [gRPC Basics: Go] (https://grpc.io/docs/tutorials/basic/go.html) for more information.
6
7 See the definition of the route guide service in routeguide/route_guide.proto.
8
9 # Run the sample code
10 To compile and run the server, assuming you are in the root of the route_guide
11 folder, i.e., .../examples/route_guide/, simply:
12
13 ```sh
14 $ go run server/server.go
15 ```
16
17 Likewise, to run the client:
18
19 ```sh
20 $ go run client/client.go
21 ```
22
23 # Optional command line flags
24 The server and client both take optional command line flags. For example, the
25 client and server run without TLS by default. To enable TLS:
26
27 ```sh
28 $ go run server/server.go -tls=true
29 ```
30
31 and
32
33 ```sh
34 $ go run client/client.go -tls=true
35 ```