GRPC C++
1.39.1
|
ClientRpcInfo represents the state of a particular RPC as it appears to an interceptor. More...
Typedefs | |
template<class Response > | |
using | ClientCallbackReader = ::grpc::ClientCallbackReader< Response > |
template<class Request > | |
using | ClientCallbackWriter = ::grpc::ClientCallbackWriter< Request > |
template<class Request , class Response > | |
using | ClientCallbackReaderWriter = ::grpc::ClientCallbackReaderWriter< Request, Response > |
template<class Response > | |
using | ClientReadReactor = ::grpc::ClientReadReactor< Response > |
template<class Request > | |
using | ClientWriteReactor = ::grpc::ClientWriteReactor< Request > |
template<class Request , class Response > | |
using | ClientBidiReactor = ::grpc::ClientBidiReactor< Request, Response > |
typedef ::grpc::ClientUnaryReactor | ClientUnaryReactor |
template<class Request > | |
using | ServerReadReactor = ::grpc::ServerReadReactor< Request > |
template<class Response > | |
using | ServerWriteReactor = ::grpc::ServerWriteReactor< Response > |
template<class Request , class Response > | |
using | ServerBidiReactor = ::grpc::ServerBidiReactor< Request, Response > |
using | ServerUnaryReactor = ::grpc::ServerUnaryReactor |
typedef ::grpc::ServerContextBase | ServerContextBase |
typedef ::grpc::CallbackServerContext | CallbackServerContext |
Enumerations | |
enum class | InterceptionHookPoints { PRE_SEND_INITIAL_METADATA , PRE_SEND_MESSAGE , POST_SEND_MESSAGE , PRE_SEND_STATUS , PRE_SEND_CLOSE , PRE_RECV_INITIAL_METADATA , PRE_RECV_MESSAGE , PRE_RECV_STATUS , POST_RECV_INITIAL_METADATA , POST_RECV_MESSAGE , POST_RECV_STATUS , POST_RECV_CLOSE , PRE_SEND_CANCEL , 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< Channel > | 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. More... | |
void | RegisterGlobalClientInterceptorFactory (ClientInterceptorFactoryInterface *factory) |
void | TestOnlyResetGlobalClientInterceptorFactory () |
std::shared_ptr< grpc::Channel > | 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) |
std::shared_ptr< ChannelCredentials > | XdsCredentials (const std::shared_ptr< ChannelCredentials > &fallback_creds) |
Builds XDS Credentials. More... | |
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< CallCredentials > | StsCredentials (const StsCredentialsOptions &options) |
std::shared_ptr< CallCredentials > | MetadataCredentialsFromPlugin (std::unique_ptr< MetadataCredentialsPlugin > plugin, grpc_security_level min_security_level) |
std::shared_ptr< ChannelCredentials > | AltsCredentials (const AltsCredentialsOptions &options) |
Builds ALTS Credentials given ALTS specific options. More... | |
std::shared_ptr< ChannelCredentials > | LocalCredentials (grpc_local_connect_type type) |
Builds Local Credentials. More... | |
std::shared_ptr< ChannelCredentials > | TlsCredentials (const TlsChannelCredentialsOptions &options) |
Builds TLS Credentials given TLS options. More... | |
std::shared_ptr< ServerCredentials > | XdsServerCredentials (const std::shared_ptr< ServerCredentials > &fallback_credentials) |
Builds Xds ServerCredentials given fallback credentials. More... | |
std::shared_ptr< ServerCredentials > | AltsServerCredentials (const AltsServerCredentialsOptions &options) |
Builds ALTS ServerCredentials given ALTS specific options. More... | |
std::shared_ptr< ServerCredentials > | LocalServerCredentials (grpc_local_connect_type type) |
std::shared_ptr< ServerCredentials > | TlsServerCredentials (const experimental::TlsServerCredentialsOptions &options) |
Builds TLS ServerCredentials given TLS options. More... | |
std::string | ValidateServiceConfigJSON (const std::string &service_config_json) |
Validates service_config_json. More... | |
std::shared_ptr< grpc::Channel > | CreateCustomChannelWithInterceptors (const std::string &target, const std::shared_ptr< grpc::ChannelCredentials > &creds, const grpc::ChannelArguments &args, std::vector< std::unique_ptr< grpc::experimental::ClientInterceptorFactoryInterface >> interceptor_creators) |
Create a new custom Channel pointing to target with interceptors being invoked per call. More... | |
grpc_sts_credentials_options | StsCredentialsCppToCoreOptions (const StsCredentialsOptions &options) |
int | TlsServerAuthorizationCheckConfigCSchedule (void *, grpc_tls_server_authorization_check_arg *arg) |
The C schedule and cancel functions for the server authorization check config. More... | |
void | TlsServerAuthorizationCheckConfigCCancel (void *, grpc_tls_server_authorization_check_arg *arg) |
void | TlsServerAuthorizationCheckArgDestroyContext (void *context) |
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
using grpc::experimental::ClientBidiReactor = typedef ::grpc::ClientBidiReactor<Request, Response> |
using grpc::experimental::ClientCallbackReader = typedef ::grpc::ClientCallbackReader<Response> |
using grpc::experimental::ClientCallbackReaderWriter = typedef ::grpc::ClientCallbackReaderWriter<Request, Response> |
using grpc::experimental::ClientCallbackWriter = typedef ::grpc::ClientCallbackWriter<Request> |
using grpc::experimental::ClientReadReactor = typedef ::grpc::ClientReadReactor<Response> |
using grpc::experimental::ClientWriteReactor = typedef ::grpc::ClientWriteReactor<Request> |
using grpc::experimental::ServerBidiReactor = typedef ::grpc::ServerBidiReactor<Request, Response> |
using grpc::experimental::ServerReadReactor = typedef ::grpc::ServerReadReactor<Request> |
using grpc::experimental::ServerUnaryReactor = typedef ::grpc::ServerUnaryReactor |
using grpc::experimental::ServerWriteReactor = typedef ::grpc::ServerWriteReactor<Response> |
|
strong |
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.
std::shared_ptr< ChannelCredentials > grpc::experimental::AltsCredentials | ( | const AltsCredentialsOptions & | options | ) |
Builds ALTS Credentials given ALTS specific options.
std::shared_ptr< ServerCredentials > grpc::experimental::AltsServerCredentials | ( | const AltsServerCredentialsOptions & | options | ) |
Builds ALTS ServerCredentials given ALTS specific options.
Builds Local ServerCredentials.
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.
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.
target | The URI of the endpoint to connect to. |
creds | Credentials 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. |
args | Options for channel creation. |
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 | ||
) |
std::shared_ptr<grpc::Channel> grpc::experimental::CreateCustomChannelWithInterceptors | ( | const std::string & | target, |
const std::shared_ptr< grpc::ChannelCredentials > & | creds, | ||
const grpc::ChannelArguments & | args, | ||
std::vector< std::unique_ptr< grpc::experimental::ClientInterceptorFactoryInterface >> | interceptor_creators | ||
) |
Create a new custom Channel pointing to target with interceptors being invoked per call.
target | The URI of the endpoint to connect to. |
creds | Credentials 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. |
args | Options for channel creation. |
std::shared_ptr< ChannelCredentials > grpc::experimental::LocalCredentials | ( | grpc_local_connect_type | type | ) |
Builds Local Credentials.
std::shared_ptr< ServerCredentials > grpc::experimental::LocalServerCredentials | ( | grpc_local_connect_type | type | ) |
std::shared_ptr< CallCredentials > grpc::experimental::MetadataCredentialsFromPlugin | ( | std::unique_ptr< MetadataCredentialsPlugin > | plugin, |
grpc_security_level | min_security_level | ||
) |
void grpc::experimental::RegisterGlobalClientInterceptorFactory | ( | ClientInterceptorFactoryInterface * | factory | ) |
std::shared_ptr< CallCredentials > grpc::experimental::StsCredentials | ( | const StsCredentialsOptions & | options | ) |
grpc_sts_credentials_options grpc::experimental::StsCredentialsCppToCoreOptions | ( | const StsCredentialsOptions & | options | ) |
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.
grpc::Status grpc::experimental::StsCredentialsOptionsFromJson | ( | const std::string & | json_string, |
StsCredentialsOptions * | options | ||
) |
void grpc::experimental::TestOnlyResetGlobalClientInterceptorFactory | ( | ) |
std::shared_ptr< ChannelCredentials > grpc::experimental::TlsCredentials | ( | const TlsChannelCredentialsOptions & | options | ) |
Builds TLS Credentials given TLS options.
void grpc::experimental::TlsServerAuthorizationCheckArgDestroyContext | ( | void * | context | ) |
void grpc::experimental::TlsServerAuthorizationCheckConfigCCancel | ( | void * | , |
grpc_tls_server_authorization_check_arg * | arg | ||
) |
int grpc::experimental::TlsServerAuthorizationCheckConfigCSchedule | ( | void * | , |
grpc_tls_server_authorization_check_arg * | arg | ||
) |
The C schedule and cancel functions for the server authorization check config.
The following 2 functions convert the user-provided schedule or cancel functions into C style schedule or cancel functions.
They populate a C server authorization check arg with the result of a C++ server authorization check schedule/cancel API.
These are internal functions, not meant to be accessed by the user.
std::shared_ptr< ServerCredentials > grpc::experimental::TlsServerCredentials | ( | const experimental::TlsServerCredentialsOptions & | options | ) |
Builds TLS ServerCredentials given TLS options.
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.
std::shared_ptr< ChannelCredentials > grpc::experimental::XdsCredentials | ( | const std::shared_ptr< ChannelCredentials > & | fallback_creds | ) |
Builds XDS Credentials.
std::shared_ptr< ServerCredentials > grpc::experimental::XdsServerCredentials | ( | const std::shared_ptr< ServerCredentials > & | fallback_credentials | ) |
Builds Xds ServerCredentials given fallback credentials.