Go to the documentation of this file.
23 #include "absl/flags/flag.h"
24 #include "absl/flags/parse.h"
25 #include "absl/strings/str_cat.h"
34 #include "examples/protos/helloworld.grpc.pb.h"
36 #include "helloworld.grpc.pb.h"
41 "Server port for maintenance if --secure is used.");
42 ABSL_FLAG(
bool, secure,
true,
"Secure mode");
67 grpc::experimental::XdsServerBuilder xds_builder;
69 std::unique_ptr<Server> xds_enabled_server;
70 std::unique_ptr<Server>
server;
74 xds_builder.RegisterService(&
service);
81 xds_enabled_server = xds_builder.BuildAndStart();
95 server = xds_builder.BuildAndStart();
104 int main(
int argc,
char** argv) {
std::string StrCat(const AlphaNum &a, const AlphaNum &b)
void EnableDefaultHealthCheckService(bool enable)
std::vector< char * > ParseCommandLine(int argc, char *argv[])
ABSL_FLAG(int32_t, port, 50051, "Server port for service.")
std::unique_ptr< Server > server
std::shared_ptr< ServerCredentials > XdsServerCredentials(const std::shared_ptr< ServerCredentials > &fallback_credentials)
Status SayHello(ServerContext *context, const HelloRequest *request, HelloReply *reply) override
A builder class for the creation and startup of grpc::Server instances.
GPRAPI void gpr_log(const char *file, int line, gpr_log_severity severity, const char *format,...) GPR_PRINT_FORMAT_CHECK(4
int main(int argc, char **argv)
ABSL_MUST_USE_RESULT T GetFlag(const absl::Flag< T > &flag)
static const char prefix[]
GRPC_CUSTOM_UTIL_STATUS Status
void AddAdminServices(grpc::ServerBuilder *builder)
std::shared_ptr< ServerCredentials > InsecureServerCredentials()
grpc::ClientContext context
__attribute__((deprecated("Please use GRPCProtoMethod."))) @interface ProtoMethod NSString * service
void InitProtoReflectionServerBuilderPlugin()
grpc
Author(s):
autogenerated on Fri May 16 2025 03:00:58