Created
April 20, 2017 01:08
-
-
Save hadv/c0ea7becd7652402e323628503341982 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
syntax = “proto3”; | |
option go_package = “echo”; | |
// Echo Service | |
// | |
// Echo Service API consists of a single service which returns a message. | |
package hadv.grpc.echo; | |
import “google/api/annotations.proto”; | |
// Message represents a simple message sent to the Echo service. | |
message Message { | |
// Id represents the message identifier. | |
string id = 1; | |
} | |
// Echo service responds to incoming echo requests. | |
service EchoService { | |
// Echo method receives a simple message and returns it. | |
// The message posted as the id parameter will also be returned. | |
rpc Echo(Message) returns (Message) { | |
option (google.api.http) = { | |
post: “/v1/example/echo/{id}” | |
}; | |
} | |
// EchoBody method receives a simple message and returns it. | |
rpc EchoBody(Message) returns (Message) { | |
option (google.api.http) = { | |
post: “/v1/example/echo_body” | |
body: “*” | |
}; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment