GRPC C++  1.70.1
Public Types | Public Member Functions
grpc::ServerBuilder::experimental_type Class Reference

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::ExternalConnectionAcceptorAddExternalConnectionAcceptor (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...
 
ServerBuilderAddPassiveListener (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...
 

Detailed Description

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.

Member Enumeration Documentation

◆ ExternalConnectionType

Enumerator
FROM_FD 

Constructor & Destructor Documentation

◆ experimental_type()

grpc::ServerBuilder::experimental_type::experimental_type ( ServerBuilder builder)
inlineexplicit

Member Function Documentation

◆ AddExternalConnectionAcceptor()

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.

◆ AddPassiveListener()

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.

◆ EnableCallMetricRecording()

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.

◆ SetAuthorizationPolicyProvider()

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.

◆ SetInterceptorCreators()

void grpc::ServerBuilder::experimental_type::SetInterceptorCreators ( std::vector< std::unique_ptr< grpc::experimental::ServerInterceptorFactoryInterface >>  interceptor_creators)
inline

The documentation for this class was generated from the following file: