Slide 26
Slide 26 text
27
Copyright hacomono Inc. All Rights Reserved.
# .protoファイル
service Mailer {
rpc GetMail(GetMailRequest) return (GetMailResponse) {}
}
取り組み2: 外部APIはprotoを活用
モジュラーモノリス x Rails
● rpc_desc
○ RPCに紐づく、input, outputの型の情報が取れる
# packages/mailer/public/get_mail.rbへのリクエスト
rpc_desc[:GetMail] # GetMail rpcの説明が取れる
rpc_desc[:GetMail][:input] # GetMailが扱うRequest -> GetMailRequest