Step-0: define a service

pull/3109/head
Tim Emiola 10 years ago
parent 5c72361ee1
commit 33208208fe
  1. 21
      Step_0.md

@ -1,11 +1,11 @@
# Step-0: define a service # Step-0: define a service
This section presents an example of a very simple service definition that This section presents an example of a simple service definition that receives
receives a message from a remote client. The message contains the users's a message from a remote client. The message contains the users's name and
name and sends back a greeting to that person. sends back a greeting to that person.
Here it is in full; to be used to generate gRPC code it's defined in it's own It's shown below in full; it's actually contained in separate file
file [helloworld.proto](helloworld.proto). [helloworld.proto](helloworld.proto).
``` ```
syntax = "proto3"; syntax = "proto3";
@ -32,9 +32,10 @@ service Greeting {
``` ```
The service stanza of the messages is an example of protobuf service IDL The service stanza of the message is an example of protobuf service IDL
(Interface Defintion Language). Here, it defines a very simple service that (Interface Defintion Language). Here, it defines a simple service that
receives a request and returns a response. receives a request containing a name and returns a response containing a
message.
Next in [Step-1](Step-1.md), we'll use protoc to generate code this simple Next, in [Step-1](Step-1.md), we'll use protoc to generate client code from
definition. this IDL.

Loading…
Cancel
Save