Go to the documentation of this file.
19 #ifndef GRPCPP_SERVER_BUILDER_H
20 #define GRPCPP_SERVER_BUILDER_H
44 class CompletionQueue;
46 class ServerCompletionQueue;
47 class AsyncGenericService;
52 class ServerBuilderPluginTest;
56 class ExternalConnectionAcceptorImpl;
59 class CallbackGenericService;
61 namespace experimental {
62 class OrcaServerInterceptorFactory;
129 std::shared_ptr<grpc::ServerCredentials> creds,
130 int* selected_port =
nullptr);
163 bool is_frequently_polled =
true);
247 std::unique_ptr<grpc::ServerBuilderPlugin> (*CreatePlugin)());
262 std::vector<std::unique_ptr<
264 interceptor_creators) {
276 std::unique_ptr<grpc::experimental::ExternalConnectionAcceptor>
278 std::shared_ptr<ServerCredentials> creds);
283 std::shared_ptr<experimental::AuthorizationPolicyProviderInterface>
293 std::unique_ptr<grpc::ContextAllocator> context_allocator);
311 std::shared_ptr<ServerCredentials>
creds;
330 std::vector<NamedService*> service_refs;
332 service_refs.push_back(
ptr.get());
338 std::vector<grpc::ServerBuilderOption*>
options() {
339 std::vector<grpc::ServerBuilderOption*> option_refs;
341 option_refs.push_back(
ptr.get());
379 std::vector<std::unique_ptr<grpc::ServerBuilderOption>>
options_;
386 std::vector<grpc::ServerCompletionQueue*>
cqs_;
388 std::shared_ptr<grpc::ServerCredentials>
creds_;
389 std::vector<std::unique_ptr<grpc::ServerBuilderPlugin>>
plugins_;
405 std::unique_ptr<grpc::experimental::ServerInterceptorFactoryInterface>>
408 std::unique_ptr<grpc::experimental::ServerInterceptorFactoryInterface>>
410 std::vector<std::shared_ptr<grpc::internal::ExternalConnectionAcceptorImpl>>
413 std::shared_ptr<experimental::AuthorizationPolicyProviderInterface>
419 #endif // GRPCPP_SERVER_BUILDER_H
std::unique_ptr< grpc::experimental::ExternalConnectionAcceptor > AddExternalConnectionAcceptor(ExternalConnectionType type, std::shared_ptr< ServerCredentials > creds)
SyncServerSettings sync_server_settings_
struct grpc_resource_quota grpc_resource_quota
virtual std::unique_ptr< grpc::Server > BuildAndStart()
std::vector< grpc::ServerBuilderOption * > options()
Experimental, to be deprecated.
ServerBuilder & SetSyncServerOption(SyncServerOption option, int value)
Only useful if this is a Synchronous server.
ServerBuilder & AddChannelArgument(const std::string &arg, const T &value)
grpc_compression_level level
grpc_compression_algorithm
std::vector< std::unique_ptr< grpc::ServerBuilderOption > > options_
std::vector< std::unique_ptr< NamedService > > services_
struct grpc::ServerBuilder::@7 maybe_default_compression_algorithm_
experimental_type experimental()
ServerBuilder & SetOption(std::unique_ptr< grpc::ServerBuilderOption > option)
experimental_type(ServerBuilder *builder)
Experimental, to be deprecated.
ServerBuilder & RegisterService(grpc::Service *service)
ResourceQuotaRefPtr resource_quota
#define T(upbtypeconst, upbtype, ctype, default_value)
std::vector< Port > ports()
Experimental, to be deprecated.
void set_fetcher(grpc_server_config_fetcher *server_config_fetcher)
Experimental API, subject to change.
Desriptor of an RPC service and its various RPC methods.
ServerBuilder & RegisterAsyncGenericService(grpc::AsyncGenericService *service)
ServerBuilder & SetResourceQuota(const grpc::ResourceQuota &resource_quota)
Set the attached buffer pool for this server.
virtual ~ExternalConnectionAcceptor()
@ MAX_POLLERS
Maximum number of polling threads.
grpc::CallbackGenericService * callback_generic_service_
ServerBuilder & AddListeningPort(const std::string &addr_uri, std::shared_ptr< grpc::ServerCredentials > creds, int *selected_port=nullptr)
std::vector< Port > ports_
std::shared_ptr< grpc::ServerCredentials > creds_
@ MIN_POLLERS
Minimum number of polling threads.
constexpr absl::remove_reference_t< T > && move(T &&t) noexcept
void SetAuthorizationPolicyProvider(std::shared_ptr< experimental::AuthorizationPolicyProviderInterface > provider)
std::vector< std::unique_ptr< grpc::ServerBuilderPlugin > > plugins_
@ CQ_TIMEOUT_MSEC
Completion queue timeout in milliseconds.
NamedService(const std::string &h, grpc::Service *s)
std::shared_ptr< experimental::AuthorizationPolicyProviderInterface > authorization_provider_
A builder class for the creation and startup of grpc::Server instances.
ServerBuilder & SetDefaultCompressionAlgorithm(grpc_compression_algorithm algorithm)
ServerBuilder & SetMaxSendMessageSize(int max_send_message_size)
std::vector< std::unique_ptr< grpc::experimental::ServerInterceptorFactoryInterface > > internal_interceptor_creators_
virtual ChannelArguments BuildChannelArgs()
Experimental API, subject to change.
grpc_server_config_fetcher * server_config_fetcher_
SyncServerOption
Options for synchronous servers.
grpc::AsyncGenericService * generic_service_
std::unique_ptr< std::string > HostString
Experimental, to be deprecated.
std::vector< grpc::ServerCompletionQueue * > cqs_
List of completion queues added via AddCompletionQueue method.
ServerBuilder & SetMaxReceiveMessageSize(int max_receive_message_size)
ServerBuilder & SetCompressionAlgorithmSupportStatus(grpc_compression_algorithm algorithm, bool enabled)
std::unique_ptr< grpc::ServerCompletionQueue > AddCompletionQueue(bool is_frequently_polled=true)
virtual void HandleNewConnection(NewConnectionParameters *p)=0
NamedService(grpc::Service *s)
std::unique_ptr< ContextAllocator > context_allocator_
int max_receive_message_size_
ServerBuilder & SetDefaultCompressionLevel(grpc_compression_level level)
int cq_timeout_msec
The timeout for server completion queue's AsyncNext call.
std::shared_ptr< ServerCredentials > creds
std::unique_ptr< ServerBuilderOption > MakeChannelArgumentOption(const std::string &name, const std::string &value)
struct grpc::ServerBuilder::@6 maybe_default_compression_level_
@ NUM_CQS
Number of completion queues.
std::vector< std::unique_ptr< grpc::experimental::ServerInterceptorFactoryInterface > > interceptor_creators_
grpc_resource_quota * resource_quota_
ServerBuilder & EnableWorkaround(grpc_workaround_list id)
void SetInterceptorCreators(std::vector< std::unique_ptr< grpc::experimental::ServerInterceptorFactoryInterface >> interceptor_creators)
int num_cqs
Number of server completion queues to create to listen to incoming RPCs.
__attribute__((deprecated("Please use GRPCProtoMethod."))) @interface ProtoMethod NSString * service
std::vector< NamedService * > services()
Experimental, to be deprecated.
static void InternalAddPluginFactory(std::unique_ptr< grpc::ServerBuilderPlugin >(*CreatePlugin)())
For internal use only: Register a ServerBuilderPlugin factory function.
std::vector< std::shared_ptr< grpc::internal::ExternalConnectionAcceptorImpl > > acceptors_
ServerBuilder & SetMaxMessageSize(int max_message_size)
ServerBuilder & RegisterCallbackGenericService(grpc::CallbackGenericService *service)
ServerBuilder & SetContextAllocator(std::unique_ptr< grpc::ContextAllocator > context_allocator)
int max_send_message_size_
uint32_t enabled_compression_algorithms_bitset_
grpc_compression_algorithm algorithm
grpc
Author(s):
autogenerated on Thu Mar 13 2025 03:01:16