GRPC C++
1.70.1
|
NOTE: class experimental_type is not part of the public API of this class. More...
#include <server_builder.h>
Public Types | |
enum | ExternalConnectionType { ExternalConnectionType::FROM_FD = 0 } |
Public Member Functions | |
experimental_type (ServerBuilder *builder) | |
void | SetInterceptorCreators (std::vector< std::unique_ptr< grpc::experimental::ServerInterceptorFactoryInterface >> interceptor_creators) |
std::unique_ptr< grpc::experimental::ExternalConnectionAcceptor > | AddExternalConnectionAcceptor (ExternalConnectionType type, std::shared_ptr< ServerCredentials > creds) |
Register an acceptor to handle the externally accepted connection in grpc server. More... | |
void | SetAuthorizationPolicyProvider (std::shared_ptr< experimental::AuthorizationPolicyProviderInterface > provider) |
Sets server authorization policy provider in GRPC_ARG_AUTHORIZATION_POLICY_PROVIDER channel argument. More... | |
void | EnableCallMetricRecording (experimental::ServerMetricRecorder *server_metric_recorder=nullptr) |
Enables per-call load reporting. More... | |
ServerBuilder & | AddPassiveListener (std::shared_ptr< grpc::ServerCredentials > creds, std::unique_ptr< grpc::experimental::PassiveListener > &passive_listener) |
PassiveListener lets applications provide pre-established connections to gRPC Servers. More... | |
NOTE: class experimental_type is not part of the public API of this class.
TODO(yashykt): Integrate into public API when this is no longer experimental.
|
inlineexplicit |
std::unique_ptr<grpc::experimental::ExternalConnectionAcceptor> grpc::ServerBuilder::experimental_type::AddExternalConnectionAcceptor | ( | ExternalConnectionType | type, |
std::shared_ptr< ServerCredentials > | creds | ||
) |
Register an acceptor to handle the externally accepted connection in grpc server.
The returned acceptor can be used to pass the connection to grpc server, where a channel will be created with the provided server credentials.
ServerBuilder& grpc::ServerBuilder::experimental_type::AddPassiveListener | ( | std::shared_ptr< grpc::ServerCredentials > | creds, |
std::unique_ptr< grpc::experimental::PassiveListener > & | passive_listener | ||
) |
PassiveListener lets applications provide pre-established connections to gRPC Servers.
The server will behave as if it accepted the connection itself on its own listening addresses.
This can be called multiple times to create passive listeners with different server credentials.
void grpc::ServerBuilder::experimental_type::EnableCallMetricRecording | ( | experimental::ServerMetricRecorder * | server_metric_recorder = nullptr | ) |
Enables per-call load reporting.
The server will automatically send the load metrics after each RPC. The caller can report load metrics for the current call to what ServerContext::ExperimentalGetCallMetricRecorder() returns. The server merges metrics from the optional server_metric_recorder when provided where the call metric recorder take a higher precedence. The caller owns and must ensure the server metric recorder outlives the server.
void grpc::ServerBuilder::experimental_type::SetAuthorizationPolicyProvider | ( | std::shared_ptr< experimental::AuthorizationPolicyProviderInterface > | provider | ) |
Sets server authorization policy provider in GRPC_ARG_AUTHORIZATION_POLICY_PROVIDER channel argument.
|
inline |