<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>gRPC :: Today 'tunepolo' Leaned</title><link>https://tunepolo.github.io/til/grpc/index.html</link><description/><generator>Hugo</generator><language>ja-jp</language><atom:link href="https://tunepolo.github.io/til/grpc/index.xml" rel="self" type="application/rss+xml"/><item><title>grpcurl の使い方</title><link>https://tunepolo.github.io/til/grpc/grpcurl/index.html</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://tunepolo.github.io/til/grpc/grpcurl/index.html</guid><description>公式サイト https://github.com/fullstorydev/grpcurl&#10;インストール brew install grpcurl&#10;使い方 (サーバー側でリフレクションが有効化されている場合) # localhost の 50051 でサーバーが稼働している想定 # サービス一覧を表示 grpcurl localhost:50051 list # メソッド一覧の表示 grpcurl localhost:50051 list my.custom.server.Service # メソッドの情報を表示 grpcurl localhost:50051 describe my.custom.server.Service.MethodOne # リクエストパラメータをつける場合 grpcurl -d '{"lang":"Java"}' localhost:50051 describe my.custom.server.Service/MethodOne # -d @ を使うとリクエストパラメータを標準入力から読み取る echo '{"lang":"Java"}' | grpcurl -d @ localhost:50051 my.custom.server.Service/MethodOne # unix ソケットを使って通信する場合 grpcurl -unix /tmp/path_to_socket list オプション –plaintext TLS を使わない場合</description></item></channel></rss>