#include <grpc/support/port_platform.h>#include "test/cpp/util/grpc_tool.h"#include <cstdio>#include <fstream>#include <iostream>#include <memory>#include <sstream>#include <string>#include <thread>#include "absl/flags/flag.h"#include "absl/memory/memory.h"#include <grpc/grpc.h>#include <grpcpp/channel.h>#include <grpcpp/create_channel.h>#include <grpcpp/grpcpp.h>#include <grpcpp/security/credentials.h>#include <grpcpp/support/string_ref.h>#include "test/cpp/util/cli_call.h"#include "test/cpp/util/proto_file_parser.h"#include "test/cpp/util/proto_reflection_descriptor_database.h"#include "test/cpp/util/service_describer.h"#include <unistd.h>
Go to the source code of this file.
Namespaces | |
| grpc | |
| grpc::testing | |
Functions | |
| ABSL_FLAG (bool, batch, false, "Input contains multiple requests. Please do not use this to send " "more than a few RPCs. gRPC CLI has very different performance " "characteristics compared with normal RPC calls which make it " "unsuitable for loadtesting or significant production traffic.") | |
| ABSL_FLAG (bool, binary_input, false, "Input in binary format") | |
| ABSL_FLAG (bool, binary_output, false, "Output in binary format") | |
| ABSL_FLAG (bool, display_peer_address, false, "Log the peer socket address of the connection that each RPC is made " "on to stderr.") | |
| ABSL_FLAG (bool, json_input, false, "Input in json format") | |
| ABSL_FLAG (bool, json_output, false, "Output in json format") | |
| ABSL_FLAG (bool, l, false, "Use a long listing format") | |
| ABSL_FLAG (bool, remotedb, true, "Use server types to parse and format messages") | |
| ABSL_FLAG (double, timeout, -1, "Specify timeout in seconds, used to set the deadline for all " "RPCs. The default value of -1 means no deadline has been set.") | |
| ABSL_FLAG (std::string, default_service_config, "", "Default service config to use on the channel, if non-empty. Note " "that this will be ignored if the name resolver returns a service " "config.") | |
| ABSL_FLAG (std::string, infile, "", "Input file (default is stdin)") | |
| ABSL_FLAG (std::string, metadata, "", "Metadata to send to server, in the form of key1:val1:key2:val2") | |
| ABSL_FLAG (std::string, proto_path, ".", "Path to look for the proto file. " "Multiple paths can be separated by " GRPC_CLI_PATH_SEPARATOR) | |
| ABSL_FLAG (std::string, protofiles, "", "Name of the proto file.") | |
| int | grpc::testing::GrpcToolMainLib (int argc, const char **argv, const CliCredentials &cred, const GrpcToolOutputCallback &callback) |
| ABSL_FLAG | ( | bool | , |
| batch | , | ||
| false | , | ||
| "Input contains multiple requests. Please do not use this to send " "more than a few RPCs. gRPC CLI has very different performance " "characteristics compared with normal RPC calls which make it " "unsuitable for loadtesting or significant production traffic." | |||
| ) |
| ABSL_FLAG | ( | bool | , |
| display_peer_address | , | ||
| false | , | ||
| "Log the peer socket address of the connection that each RPC is made " "on to stderr." | |||
| ) |
| ABSL_FLAG | ( | double | , |
| timeout | , | ||
| - | 1, | ||
| "Specify timeout in | seconds, | ||
| used to set the deadline for all " "RPCs. The default value of -1 means no deadline has been set." | |||
| ) |
| ABSL_FLAG | ( | std::string | , |
| default_service_config | , | ||
| "" | , | ||
| "Default service config to use on the | channel, | ||
| if non-empty. Note " "that this will be ignored if the name resolver returns a service " "config." | |||
| ) |
| ABSL_FLAG | ( | std::string | , |
| infile | , | ||
| "" | , | ||
| "Input file (default is stdin)" | |||
| ) |
| ABSL_FLAG | ( | std::string | , |
| metadata | , | ||
| "" | , | ||
| "Metadata to send to | server, | ||
| in the form of key1:val1:key2:val2" | |||
| ) |
| ABSL_FLAG | ( | std::string | , |
| proto_path | , | ||
| "." | , | ||
| "Path to look for the proto file. " "Multiple paths can be separated by " | GRPC_CLI_PATH_SEPARATOR | ||
| ) |
| ABSL_FLAG | ( | std::string | , |
| protofiles | , | ||
| "" | , | ||
| "Name of the proto file." | |||
| ) |
| const char* command |
Definition at line 247 of file grpc_tool.cc.
|
private |
Definition at line 123 of file grpc_tool.cc.
| std::function<bool(GrpcTool*, int, const char**, const CliCredentials&, GrpcToolOutputCallback)> function |
Definition at line 250 of file grpc_tool.cc.
| int max_args |
Definition at line 252 of file grpc_tool.cc.
| int min_args |
Definition at line 251 of file grpc_tool.cc.
|
private |
Definition at line 121 of file grpc_tool.cc.
|
private |
Definition at line 122 of file grpc_tool.cc.