14. gRPC:.protoファイルにAPI仕様を記述
/**
* `Greeter` service provides a way to say a greeting message to a user and
* returns a message from the user.
* - Each RPC may return `Internal` but it is not listed in the `[ERRORS]` section for brevity.
*/
service Greeter {
// Sends a greeting message to a user and returns a message from the user.
rpc SayHello (HelloRequest) returns (HelloResponse) {}
}
/**
* `Hello` sends say a hello message to a user and returns a message from
* the user.
* - the returned message may be empty.
*
* [ERRORS]
* - InvalidArgument:
* - `name` is empty or too long
* - NotFound:
* - the user specified by `name` is not found in the system
*/
message HelloRequest {
string name = 1;
}
message HelloResponse {
string message = 1;
}
サービスの説明
RPCの簡単な説明
RPCの詳細な説明
エラーの説明
24. ご清聴ありがとうございました
Thank you for your time and attention.
yoshiki.shibata@mercari.com
https://yshibata.blog.ss-blog.jp
https://twitter.com/yoshiki_shibata