Skip to content

Commit

Permalink
Fixing grpc README
Browse files Browse the repository at this point in the history
  • Loading branch information
hardikp committed Sep 14, 2018
1 parent 48d976a commit b01d4bc
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
7 changes: 6 additions & 1 deletion grpc/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# grpc demo

* `TimeService` implents `get_time` RPC call.
* `TimeService` implements `get_time` RPC call.
* `get_time` returns the current server time in string format.

## How to Run
Expand All @@ -11,6 +11,11 @@
pip3 install -r requirements.txt
```

1. (Optional) Generate the compiled files.
```bash
python -m grpc_tools.protoc --proto_path=. --python_out=. --grpc_python_out=. time.proto
```

1. Run Server in one terminal window:
```bash
python3 server.py
Expand Down
6 changes: 3 additions & 3 deletions grpc/time.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ syntax = "proto3";
package time;

service Time {
rpc GetTime (TimeRequest) returns (TimeReply) {}
rpc GetTime(TimeRequest) returns (TimeReply) {}
}

// Empty Request Message
message TimeRequest {
}
message TimeRequest {}

// The response message containing the time
message TimeReply {
// Message to return
string message = 1;
}

0 comments on commit b01d4bc

Please sign in to comment.