GRPC C++  1.26.0
Data Structures | Functions
grpc_impl::experimental Namespace Reference

Data Structures

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...
 
struct  AltsCredentialsOptions
 Options used to build AltsCredentials. More...
 
struct  AltsServerCredentialsOptions
 Options to create ServerCredentials with ALTS. More...
 
class  TlsKeyMaterialsConfig
 TLS key materials config, wrapper for grpc_tls_key_materials_config. More...
 
class  TlsCredentialReloadArg
 TLS credential reload arguments, wraps grpc_tls_credential_reload_arg. More...
 
struct  TlsCredentialReloadInterface
 An interface that the application derives and uses to instantiate a TlsCredentialReloadConfig instance. More...
 
class  TlsCredentialReloadConfig
 TLS credential reloag config, wraps grpc_tls_credential_reload_config. More...
 
class  TlsServerAuthorizationCheckArg
 TLS server authorization check arguments, wraps grpc_tls_server_authorization_check_arg. More...
 
struct  TlsServerAuthorizationCheckInterface
 An interface that the application derives and uses to instantiate a TlsServerAuthorizationCheckConfig instance. More...
 
class  TlsServerAuthorizationCheckConfig
 TLS server authorization check config, wraps grps_tls_server_authorization_check_config. More...
 
class  TlsCredentialsOptions
 TLS credentials options, wrapper for grpc_tls_credentials_options. More...
 

Functions

void ChannelResetConnectionBackoff (Channel *channel)
 Resets the channel's connection backoff. 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)
 Create a new custom Channel pointing to target with interceptors being invoked per call. More...
 
std::shared_ptr< ChannelCreateCustomChannelWithInterceptors (const grpc::string &target, const std::shared_ptr< ChannelCredentials > &creds, const ChannelArguments &args, std::vector< std::unique_ptr< grpc::experimental::ClientInterceptorFactoryInterface >> interceptor_creators)
 
grpc::Status StsCredentialsOptionsFromJson (const grpc::string &json_string, StsCredentialsOptions *options)
 Creates STS Options from a JSON string. More...
 
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< 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 TlsCredentialsOptions &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 TlsCredentialsOptions &options)
 Builds TLS ServerCredentials given TLS options. 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)
 Create a new custom Channel pointing to target with interceptors being invoked per call. More...
 
grpc_sts_credentials_options StsCredentialsCppToCoreOptions (const StsCredentialsOptions &options)
 
grpc_tls_key_materials_config * ConvertToCKeyMaterialsConfig (const std::shared_ptr< TlsKeyMaterialsConfig > &config)
 Converts the Cpp key materials to C key materials; this allocates memory for the C key materials. More...
 
int TlsCredentialReloadConfigCSchedule (void *, grpc_tls_credential_reload_arg *arg)
 The C schedule and cancel functions for the credential reload config. More...
 
void TlsCredentialReloadConfigCCancel (void *, grpc_tls_credential_reload_arg *arg)
 
void TlsCredentialReloadArgDestroyContext (void *context)
 The following 2 functions cleanup data created in the above C schedule functions. More...
 
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)
 

Function Documentation

◆ AltsCredentials()

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

Builds ALTS Credentials given ALTS specific options.

◆ AltsServerCredentials()

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

Builds ALTS ServerCredentials given ALTS specific options.

◆ ChannelResetConnectionBackoff()

void grpc_impl::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.

◆ ConvertToCKeyMaterialsConfig()

grpc_tls_key_materials_config * grpc_impl::experimental::ConvertToCKeyMaterialsConfig ( const std::shared_ptr< TlsKeyMaterialsConfig > &  config)

Converts the Cpp key materials to C key materials; this allocates memory for the C key materials.

The following function is exposed for testing purposes.

Note that the user must free the underlying pointer to private key and cert chain duplicates; they are not freed when the grpc_core::UniquePtr<char> member variables of PemKeyCertPair are unused. Similarly, the user must free the underlying pointer to c_pem_root_certs.

◆ CreateCustomChannelWithInterceptors() [1/3]

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

◆ CreateCustomChannelWithInterceptors() [2/3]

std::shared_ptr<::grpc::Channel> grpc_impl::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 
)

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() [3/3]

std::shared_ptr<grpc::Channel> grpc_impl::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 
)

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.

◆ LocalCredentials()

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

Builds Local Credentials.

◆ LocalServerCredentials()

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

Builds Local ServerCredentials.

◆ StsCredentials()

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

◆ StsCredentialsCppToCoreOptions()

grpc_sts_credentials_options grpc_impl::experimental::StsCredentialsCppToCoreOptions ( const StsCredentialsOptions options)

◆ StsCredentialsOptionsFromEnv()

grpc::Status grpc_impl::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_impl::experimental::StsCredentialsOptionsFromJson ( const grpc::string json_string,
StsCredentialsOptions options 
)

Creates STS Options from a JSON string.

The JSON schema is as follows: { "title": "STS Credentials Config", "type": "object", "required": ["token_exchange_service_uri", "subject_token_path", "subject_token_type"], "properties": { "token_exchange_service_uri": { "type": "string" }, "resource": { "type": "string" }, "audience": { "type": "string" }, "scope": { "type": "string" }, "requested_token_type": { "type": "string" }, "subject_token_path": { "type": "string" }, "subject_token_type": { "type": "string" }, "actor_token_path" : { "type": "string" }, "actor_token_type": { "type": "string" } } }

◆ TlsCredentialReloadArgDestroyContext()

void grpc_impl::experimental::TlsCredentialReloadArgDestroyContext ( void *  context)

The following 2 functions cleanup data created in the above C schedule functions.

◆ TlsCredentialReloadConfigCCancel()

void grpc_impl::experimental::TlsCredentialReloadConfigCCancel ( void *  ,
grpc_tls_credential_reload_arg arg 
)

◆ TlsCredentialReloadConfigCSchedule()

int grpc_impl::experimental::TlsCredentialReloadConfigCSchedule ( void *  ,
grpc_tls_credential_reload_arg arg 
)

The C schedule and cancel functions for the credential reload config.

The following 4 functions convert the user-provided schedule or cancel functions into C style schedule or cancel functions.

They populate a C credential reload arg with the result of a C++ credential reload schedule/cancel API.

These are internal functions, not meant to be accessed by the user.

◆ TlsCredentials()

std::shared_ptr< ChannelCredentials > grpc_impl::experimental::TlsCredentials ( const TlsCredentialsOptions options)

Builds TLS Credentials given TLS options.

◆ TlsServerAuthorizationCheckArgDestroyContext()

void grpc_impl::experimental::TlsServerAuthorizationCheckArgDestroyContext ( void *  context)

◆ TlsServerAuthorizationCheckConfigCCancel()

void grpc_impl::experimental::TlsServerAuthorizationCheckConfigCCancel ( void *  ,
grpc_tls_server_authorization_check_arg arg 
)

◆ TlsServerAuthorizationCheckConfigCSchedule()

int grpc_impl::experimental::TlsServerAuthorizationCheckConfigCSchedule ( void *  ,
grpc_tls_server_authorization_check_arg arg 
)

The C schedule and cancel functions for the server authorization check config.

They populate a C server authorization check arg with the result of a C++ server authorization check schedule/cancel API.

◆ TlsServerCredentials()

std::shared_ptr< ServerCredentials > grpc_impl::experimental::TlsServerCredentials ( const TlsCredentialsOptions options)

Builds TLS ServerCredentials given TLS options.