diff options
author | Yuchen Zeng <zyc@google.com> | 2016-07-07 11:32:25 -0700 |
---|---|---|
committer | Yuchen Zeng <zyc@google.com> | 2016-07-07 11:32:25 -0700 |
commit | c24e0ee4f00a348a2f9948c820cf08be813c5f8a (patch) | |
tree | 5df02d1c0a71bddca621f10115df3605270e7983 /test/cpp/util/grpc_cli.cc | |
parent | 256cc7aa034f038f8e82f3e278ca61b64252693b (diff) |
Update docs
Diffstat (limited to 'test/cpp/util/grpc_cli.cc')
-rw-r--r-- | test/cpp/util/grpc_cli.cc | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/test/cpp/util/grpc_cli.cc b/test/cpp/util/grpc_cli.cc index 71470e5214..1a9662694a 100644 --- a/test/cpp/util/grpc_cli.cc +++ b/test/cpp/util/grpc_cli.cc @@ -34,18 +34,21 @@ /* A command line tool to talk to a grpc server. Example of talking to grpc interop server: - grpc_cli call localhost:50051 UnaryCall src/proto/grpc/testing/test.proto \ - "response_size:10" --enable_ssl=false + grpc_cli call localhost:50051 UnaryCall "response_size:10" \ + --proto_file=src/proto/grpc/testing/test.prot --enable_ssl=false Options: - 1. --proto_path, if your proto file is not under current working directory, + 1. --proto_file, use this flag to provide a proto file if the server does + does not have the reflection service. + 2. --proto_path, if your proto file is not under current working directory, use this flag to provide a search root. It should work similar to the - counterpart in protoc. - 2. --metadata specifies metadata to be sent to the server, such as: + counterpart in protoc. This option is valid only when proto_file is + provided. + 3. --metadata specifies metadata to be sent to the server, such as: --metadata="MyHeaderKey1:Value1:MyHeaderKey2:Value2" - 3. --enable_ssl, whether to use tls. - 4. --use_auth, if set to true, attach a GoogleDefaultCredentials to the call - 3. --input_binary_file, a file containing the serialized request. The file + 4. --enable_ssl, whether to use tls. + 5. --use_auth, if set to true, attach a GoogleDefaultCredentials to the call + 6. --input_binary_file, a file containing the serialized request. The file can be generated by calling something like: protoc --proto_path=src/proto/grpc/testing/ \ --encode=grpc.testing.SimpleRequest \ @@ -53,7 +56,7 @@ < input.txt > input.bin If this is used and no proto file is provided in the argument list, the method string has to be exact in the form of /package.service/method. - 4. --output_binary_file, a file to write binary format response into, it can + 7. --output_binary_file, a file to write binary format response into, it can be later decoded using protoc: protoc --proto_path=src/proto/grpc/testing/ \ --decode=grpc.testing.SimpleResponse \ |