diff options
author | 2016-07-25 14:38:07 -0700 | |
---|---|---|
committer | 2016-07-25 14:38:07 -0700 | |
commit | 28263275f0ab22d5a9d01f7e5afddbcc24a9d22c (patch) | |
tree | 7727bcff3b242aeb7044d1bd15557135d1fe9428 /test/cpp/util/grpc_cli.cc | |
parent | 29ca79be8939c0386f1c7b17ba66cc3b105c7fc1 (diff) |
Remove unnecessary dependencies
Diffstat (limited to 'test/cpp/util/grpc_cli.cc')
-rw-r--r-- | test/cpp/util/grpc_cli.cc | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/test/cpp/util/grpc_cli.cc b/test/cpp/util/grpc_cli.cc index 28c87956d6..897ac5ce4a 100644 --- a/test/cpp/util/grpc_cli.cc +++ b/test/cpp/util/grpc_cli.cc @@ -33,19 +33,24 @@ /* A command line tool to talk to a grpc server. + Run `grpc_cli help` command to see its usage information. + 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" \ + --protofiles=src/proto/grpc/testing/test.proto --enable_ssl=false Options: - 1. --proto_path, if your proto file is not under current working directory, + 1. --protofiles, 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 protofiles 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 +58,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 \ |