GRPC C++  1.66.0
Namespaces | Data Structures | Typedefs | Enumerations | Functions
grpc::experimental Namespace Reference

ClientRpcInfo represents the state of a particular RPC as it appears to an interceptor. More...

Namespaces

 binder
 

Data Structures

struct  AltsCredentialsOptions
 Options used to build AltsCredentials. More...
 
struct  AltsServerCredentialsOptions
 Options to create ServerCredentials with ALTS. More...
 
class  AuthorizationPolicyProviderInterface
 
class  CallMetricRecorder
 Records call metrics for the purpose of load balancing. More...
 
class  CertificateProviderInterface
 
class  CertificateVerifier
 
class  ClientInterceptorFactoryInterface
 
class  ClientRpcInfo
 
class  DelegatingChannel
 
class  ExternalCertificateVerifier
 
class  ExternalConnectionAcceptor
 
class  FileWatcherAuthorizationPolicyProvider
 
class  FileWatcherCertificateProvider
 
class  HostNameCertificateVerifier
 
struct  IdentityKeyCertPair
 
class  Interceptor
 Interface for an interceptor. More...
 
class  InterceptorBatchMethods
 Class that is passed as an argument to the Intercept method of the application's Interceptor interface implementation. More...
 
class  NoOpCertificateVerifier
 
class  ServerInterceptorFactoryInterface
 
class  ServerMetricRecorder
 Records server wide metrics to be reported to the client. More...
 
class  ServerRpcInfo
 ServerRpcInfo represents the state of a particular RPC as it appears to an interceptor. More...
 
class  StaticDataAuthorizationPolicyProvider
 
class  StaticDataCertificateProvider
 
struct  StsCredentialsOptions
 Options for creating STS Oauth Token Exchange credentials following the IETF draft https://tools.ietf.org/html/draft-ietf-oauth-token-exchange-16. More...
 
class  TlsChannelCredentialsOptions
 
class  TlsCredentialsOptions
 
class  TlsCustomVerificationCheckRequest
 
class  TlsServerCredentialsOptions
 

Typedefs

template<class Request , class Response >
using ServerBidiReactor = ::grpc::ServerBidiReactor< Request, Response >
 

Enumerations

enum  InterceptionHookPoints {
  InterceptionHookPoints::PRE_SEND_INITIAL_METADATA, InterceptionHookPoints::PRE_SEND_MESSAGE, InterceptionHookPoints::POST_SEND_MESSAGE, InterceptionHookPoints::PRE_SEND_STATUS,
  InterceptionHookPoints::PRE_SEND_CLOSE, InterceptionHookPoints::PRE_RECV_INITIAL_METADATA, InterceptionHookPoints::PRE_RECV_MESSAGE, InterceptionHookPoints::PRE_RECV_STATUS,
  InterceptionHookPoints::POST_RECV_INITIAL_METADATA, InterceptionHookPoints::POST_RECV_MESSAGE, InterceptionHookPoints::POST_RECV_STATUS, InterceptionHookPoints::POST_RECV_CLOSE,
  InterceptionHookPoints::PRE_SEND_CANCEL, InterceptionHookPoints::NUM_INTERCEPTION_HOOKS
}
 An enumeration of different possible points at which the Intercept method of the Interceptor interface may be called. More...
 

Functions

void ChannelResetConnectionBackoff (Channel *channel)
 Resets the channel's connection backoff. More...
 
std::shared_ptr< ChannelCreateCustomChannelWithInterceptors (const grpc::string &target, const std::shared_ptr< ChannelCredentials > &creds, const ChannelArguments &args, std::vector< std::unique_ptr< experimental::ClientInterceptorFactoryInterface >> interceptor_creators)
 Create a new custom Channel pointing to target with interceptors being invoked per call. More...
 
std::shared_ptr< grpc::ServerCredentialsBinderServerCredentials (std::shared_ptr< grpc::experimental::binder::SecurityPolicy > security_policy)
 EXPERIMENTAL Builds Binder ServerCredentials. More...
 
std::shared_ptr< grpc::ChannelCreateCustomChannelWithInterceptors (const grpc::string &target, const std::shared_ptr< grpc::ChannelCredentials > &creds, const grpc::ChannelArguments &args, std::vector< std::unique_ptr< grpc::experimental::ClientInterceptorFactoryInterface >> interceptor_creators)
 
grpc::Status StsCredentialsOptionsFromJson (const std::string &json_string, StsCredentialsOptions *options)
 
grpc::Status StsCredentialsOptionsFromEnv (StsCredentialsOptions *options)
 Creates STS credentials options from the $STS_CREDENTIALS environment variable. More...
 
std::shared_ptr< CallCredentialsStsCredentials (const StsCredentialsOptions &options)
 
std::shared_ptr< CallCredentialsMetadataCredentialsFromPlugin (std::unique_ptr< MetadataCredentialsPlugin > plugin, grpc_security_level min_security_level)
 
std::shared_ptr< ChannelCredentialsAltsCredentials (const AltsCredentialsOptions &options)
 Builds ALTS Credentials given ALTS specific options. More...
 
std::shared_ptr< ChannelCredentialsLocalCredentials (grpc_local_connect_type type)
 Builds Local Credentials. More...
 
std::shared_ptr< ChannelCredentialsTlsCredentials (const TlsChannelCredentialsOptions &options)
 Builds TLS Credentials given TLS options. More...
 
std::shared_ptr< ServerCredentialsAltsServerCredentials (const AltsServerCredentialsOptions &options)
 Builds ALTS ServerCredentials given ALTS specific options. More...
 
std::shared_ptr< ServerCredentialsLocalServerCredentials (grpc_local_connect_type type)
 Builds Local ServerCredentials. More...
 
std::shared_ptr< ServerCredentialsTlsServerCredentials (const experimental::TlsServerCredentialsOptions &options)
 Builds TLS ServerCredentials given TLS options. More...
 
void RegisterGlobalClientInterceptorFactory (ClientInterceptorFactoryInterface *factory)
 
void TestOnlyResetGlobalClientInterceptorFactory ()
 
std::string ValidateServiceConfigJSON (const std::string &service_config_json)
 Validates service_config_json. More...
 

Detailed Description

ClientRpcInfo represents the state of a particular RPC as it appears to an interceptor.

It is created and owned by the library and passed to the CreateClientInterceptor method of the application's ClientInterceptorFactoryInterface implementation

Typedef Documentation

◆ ServerBidiReactor

template<class Request , class Response >
using grpc::experimental::ServerBidiReactor = typedef ::grpc::ServerBidiReactor<Request, Response>

Enumeration Type Documentation

◆ InterceptionHookPoints

An enumeration of different possible points at which the Intercept method of the Interceptor interface may be called.

Any given call to Intercept will include one or more of these hook points, and each hook point makes certain types of information available to the interceptor. In these enumeration names, PRE_SEND means that an interception has taken place between the time the application provided a certain type of data (e.g., initial metadata, status) and the time that that data goes to the other side. POST_SEND means that the data has been committed for going to the other side (even if it has not yet been received at the other side). PRE_RECV means an interception between the time that a certain operation has been requested and it is available. POST_RECV means that a result is available but has not yet been passed back to the application. A batch of interception points will only contain either PRE or POST hooks but not both types. For example, a batch with PRE_SEND hook points will not contain POST_RECV or POST_SEND ops. Likewise, a batch with POST_* ops can not contain PRE_* ops.

Enumerator
PRE_SEND_INITIAL_METADATA 

The first three in this list are for clients and servers.

PRE_SEND_MESSAGE 
POST_SEND_MESSAGE 
PRE_SEND_STATUS 
PRE_SEND_CLOSE 
PRE_RECV_INITIAL_METADATA 

The following three are for hijacked clients only.

A batch with PRE_RECV_* hook points will never contain hook points of other types.

PRE_RECV_MESSAGE 
PRE_RECV_STATUS 
POST_RECV_INITIAL_METADATA 

The following two are for all clients and servers.

POST_RECV_MESSAGE 
POST_RECV_STATUS 
POST_RECV_CLOSE 
PRE_SEND_CANCEL 

This is a special hook point available to both clients and servers when TryCancel() is performed.

  • No other hook points will be present along with this.
  • It is illegal for an interceptor to block/delay this operation.
  • ALL interceptors see this hook point irrespective of whether the RPC was hijacked or not.
NUM_INTERCEPTION_HOOKS 

Function Documentation

◆ AltsCredentials()

std::shared_ptr<ChannelCredentials> grpc::experimental::AltsCredentials ( const AltsCredentialsOptions options)

Builds ALTS Credentials given ALTS specific options.

◆ AltsServerCredentials()

std::shared_ptr<ServerCredentials> grpc::experimental::AltsServerCredentials ( const AltsServerCredentialsOptions options)

Builds ALTS ServerCredentials given ALTS specific options.

◆ BinderServerCredentials()

std::shared_ptr<grpc::ServerCredentials> grpc::experimental::BinderServerCredentials ( std::shared_ptr< grpc::experimental::binder::SecurityPolicy security_policy)

EXPERIMENTAL Builds Binder ServerCredentials.

This should be used along with binder: URI scheme. The path in the URI can later be used to access the server's endpoint binder. Note that calling ServerBuilder::AddListeningPort() with Binder ServerCredentials in a non-supported environment will make the subsequent call to ServerBuilder::BuildAndStart() return a null pointer.

◆ ChannelResetConnectionBackoff()

void grpc::experimental::ChannelResetConnectionBackoff ( Channel channel)

Resets the channel's connection backoff.

TODO(roth): Once we see whether this proves useful, either create a gRFC and change this to be a method of the Channel class, or remove it.

◆ CreateCustomChannelWithInterceptors() [1/2]

std::shared_ptr<Channel> grpc::experimental::CreateCustomChannelWithInterceptors ( const grpc::string &  target,
const std::shared_ptr< ChannelCredentials > &  creds,
const ChannelArguments args,
std::vector< std::unique_ptr< experimental::ClientInterceptorFactoryInterface >>  interceptor_creators 
)

Create a new custom Channel pointing to target with interceptors being invoked per call.

Warning
For advanced use and testing ONLY. Override default channel arguments only if necessary.
Parameters
targetThe URI of the endpoint to connect to.
credsCredentials to use for the created channel. If it does not hold an object or is invalid, a lame channel (one on which all operations fail) is returned.
argsOptions for channel creation.

◆ CreateCustomChannelWithInterceptors() [2/2]

std::shared_ptr<grpc::Channel> grpc::experimental::CreateCustomChannelWithInterceptors ( const grpc::string &  target,
const std::shared_ptr< grpc::ChannelCredentials > &  creds,
const grpc::ChannelArguments args,
std::vector< std::unique_ptr< grpc::experimental::ClientInterceptorFactoryInterface >>  interceptor_creators 
)

◆ LocalCredentials()

std::shared_ptr<ChannelCredentials> grpc::experimental::LocalCredentials ( grpc_local_connect_type  type)

Builds Local Credentials.

◆ LocalServerCredentials()

std::shared_ptr<ServerCredentials> grpc::experimental::LocalServerCredentials ( grpc_local_connect_type  type)

Builds Local ServerCredentials.

◆ MetadataCredentialsFromPlugin()

std::shared_ptr<CallCredentials> grpc::experimental::MetadataCredentialsFromPlugin ( std::unique_ptr< MetadataCredentialsPlugin plugin,
grpc_security_level  min_security_level 
)

◆ RegisterGlobalClientInterceptorFactory()

void grpc::experimental::RegisterGlobalClientInterceptorFactory ( ClientInterceptorFactoryInterface factory)

◆ StsCredentials()

std::shared_ptr<CallCredentials> grpc::experimental::StsCredentials ( const StsCredentialsOptions options)

◆ StsCredentialsOptionsFromEnv()

grpc::Status grpc::experimental::StsCredentialsOptionsFromEnv ( StsCredentialsOptions options)

Creates STS credentials options from the $STS_CREDENTIALS environment variable.

This environment variable points to the path of a JSON file comforming to the schema described above.

◆ StsCredentialsOptionsFromJson()

grpc::Status grpc::experimental::StsCredentialsOptionsFromJson ( const std::string &  json_string,
StsCredentialsOptions options 
)

◆ TestOnlyResetGlobalClientInterceptorFactory()

void grpc::experimental::TestOnlyResetGlobalClientInterceptorFactory ( )

◆ TlsCredentials()

std::shared_ptr<ChannelCredentials> grpc::experimental::TlsCredentials ( const TlsChannelCredentialsOptions options)

Builds TLS Credentials given TLS options.

◆ TlsServerCredentials()

std::shared_ptr<ServerCredentials> grpc::experimental::TlsServerCredentials ( const experimental::TlsServerCredentialsOptions options)

Builds TLS ServerCredentials given TLS options.

◆ ValidateServiceConfigJSON()

std::string grpc::experimental::ValidateServiceConfigJSON ( const std::string &  service_config_json)

Validates service_config_json.

If valid, returns an empty string. Otherwise, returns the validation error. TODO(yashykt): Promote it to out of experimental once it is proved useful and gRFC is accepted.