GRPC C++
1.74.0
|
ClientRpcInfo represents the state of a particular RPC as it appears to an interceptor. More...
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... | |
int64_t | ChannelGetChannelzUuid (Channel *channel) |
Retrieves a channel's channelz uuid TODO(ctiller): 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. 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... | |
std::shared_ptr< grpc::Channel > | CreateChannelFromEndpoint (std::unique_ptr< grpc_event_engine::experimental::EventEngine::Endpoint > endpoint, const std::shared_ptr< ChannelCredentials > &creds, const ChannelArguments &args) |
Creates a new Channel from an EventEngine endpoint. More... | |
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) |
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 > | AltsServerCredentials (const AltsServerCredentialsOptions &options) |
Builds ALTS ServerCredentials given ALTS specific options. More... | |
std::shared_ptr< ServerCredentials > | LocalServerCredentials (grpc_local_connect_type type) |
Builds Local ServerCredentials. More... | |
std::shared_ptr< ServerCredentials > | TlsServerCredentials (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... | |
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::ServerBidiReactor = typedef ::grpc::ServerBidiReactor<Request, 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.
int64_t grpc::experimental::ChannelGetChannelzUuid | ( | Channel * | channel | ) |
Retrieves a channel's channelz uuid TODO(ctiller): 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.
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<grpc::Channel> grpc::experimental::CreateChannelFromEndpoint | ( | std::unique_ptr< grpc_event_engine::experimental::EventEngine::Endpoint > | endpoint, |
const std::shared_ptr< ChannelCredentials > & | creds, | ||
const ChannelArguments & | args | ||
) |
Creates a new Channel from an EventEngine endpoint.
The channel target will be hard-coded to something like "ipv4:127.0.0.1:80". The default authority will be set to the endpoint's peer address, but the application can override it using the GRPC_ARG_DEFAULT_AUTHORITY channel argument. This API supports both secure and insecure channel credentials.
endpoint | A unique pointer to an EventEngine endpoint representing an established connection. |
creds | The channel credentials used to secure the connection. |
args | Channel arguments used to configure the channel behavior. |
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<ChannelCredentials> grpc::experimental::LocalCredentials | ( | grpc_local_connect_type | type | ) |
Builds Local Credentials.
std::shared_ptr<ServerCredentials> grpc::experimental::LocalServerCredentials | ( | grpc_local_connect_type | type | ) |
Builds Local ServerCredentials.
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::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 conforming 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.
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.