GRPC C++  1.22.0
Namespaces | Data Structures | Functions | Variables
grpc_impl Namespace Reference

An Alarm posts the user-provided tag to its associated completion queue or invokes the user-provided function on expiry or cancellation. More...

Namespaces

 experimental
 

Data Structures

class  Alarm
 
class  AuthMetadataProcessor
 Interface allowing custom server-side authorization based on credentials encoded in metadata. More...
 
class  CallCredentials
 A call credentials object encapsulates the state needed by a client to authenticate with a server for a given call on a channel. More...
 
class  Channel
 Channels represent a connection to an endpoint. Created by CreateChannel. More...
 
class  ChannelArguments
 Options for channel creation. More...
 
class  ChannelCredentials
 A channel credentials object encapsulates all the state needed by a client to authenticate with a server for a given channel. More...
 
class  ClientContext
 A ClientContext allows the person implementing a service client to: More...
 
class  CompletionQueue
 A thin wrapper around grpc_completion_queue (see src/core/lib/surface/completion_queue.h). More...
 
class  GenericStub
 Generic stubs provide a type-unsafe interface to call gRPC methods by name. More...
 
class  HealthCheckServiceInterface
 The gRPC server uses this interface to expose the health checking service without depending on protobuf. More...
 
class  MetadataCredentialsPlugin
 User defined metadata credentials. More...
 
class  PropagationOptions
 Options for ClientContext::FromServerContext specifying which traits from the ServerContext to propagate (copy) from it into a new ClientContext. More...
 
class  ResourceQuota
 ResourceQuota represents a bound on memory and thread usage by the gRPC library. More...
 
class  Server
 Represents a gRPC server. More...
 
class  ServerBuilder
 A builder class for the creation and startup of grpc::Server instances. More...
 
class  ServerBuilderOption
 Interface to pass an option to a ServerBuilder. More...
 
class  ServerCompletionQueue
 A specific type of completion queue used by the processing of notifications by servers. More...
 
class  ServerContext
 A ServerContext allows the person implementing a service handler to: More...
 
class  ServerCredentials
 Wrapper around grpc_server_credentials, a way to authenticate a server. More...
 
class  ServerInitializer
 
struct  SslCredentialsOptions
 Options used to build SslCredentials. More...
 

Functions

std::shared_ptr<::grpc::ChannelCreateChannelImpl (const grpc::string &target, const std::shared_ptr<::grpc::ChannelCredentials > &creds)
 Create a new Channel pointing to target. More...
 
std::shared_ptr<::grpc::ChannelCreateCustomChannelImpl (const grpc::string &target, const std::shared_ptr<::grpc::ChannelCredentials > &creds, const ::grpc::ChannelArguments &args)
 Create a new custom Channel pointing to target. More...
 
void EnableDefaultHealthCheckService (bool enable)
 Enable/disable the default health checking service. More...
 
bool DefaultHealthCheckServiceEnabled ()
 Returns whether the default health checking service is enabled. More...
 
std::shared_ptr<::grpc::ChannelCreateCustomChannelImpl (const grpc::string &target, const std::shared_ptr< ChannelCredentials > &creds, const grpc::ChannelArguments &args)
 
std::shared_ptr< ChannelCredentialsGoogleDefaultCredentials ()
 Builds credentials with reasonable defaults. More...
 
std::shared_ptr< ChannelCredentialsSslCredentials (const SslCredentialsOptions &options)
 Builds SSL Credentials given SSL specific options. More...
 
std::shared_ptr< CallCredentialsGoogleComputeEngineCredentials ()
 Builds credentials for use when running in GCE. More...
 
std::shared_ptr< CallCredentialsServiceAccountJWTAccessCredentials (const grpc::string &json_key, long token_lifetime_seconds=grpc_impl::kMaxAuthTokenLifetimeSecs)
 Builds Service Account JWT Access credentials. More...
 
std::shared_ptr< CallCredentialsGoogleRefreshTokenCredentials (const grpc::string &json_refresh_token)
 Builds refresh token credentials. More...
 
std::shared_ptr< CallCredentialsAccessTokenCredentials (const grpc::string &access_token)
 Builds access token credentials. More...
 
std::shared_ptr< CallCredentialsGoogleIAMCredentials (const grpc::string &authorization_token, const grpc::string &authority_selector)
 Builds IAM credentials. More...
 
std::shared_ptr< ChannelCredentialsCompositeChannelCredentials (const std::shared_ptr< ChannelCredentials > &channel_creds, const std::shared_ptr< CallCredentials > &call_creds)
 Combines a channel credentials and a call credentials into a composite channel credentials. More...
 
std::shared_ptr< CallCredentialsCompositeCallCredentials (const std::shared_ptr< CallCredentials > &creds1, const std::shared_ptr< CallCredentials > &creds2)
 Combines two call credentials objects into a composite call credentials. More...
 
std::shared_ptr< ChannelCredentialsInsecureChannelCredentials ()
 Credentials for an unencrypted, unauthenticated channel. More...
 
std::shared_ptr< ChannelCredentialsCronetChannelCredentials (void *engine)
 Credentials for a channel using Cronet. More...
 
std::shared_ptr< CallCredentialsMetadataCredentialsFromPlugin (std::unique_ptr< MetadataCredentialsPlugin > plugin)
 
std::shared_ptr< ServerCredentialsSslServerCredentials (const grpc::SslServerCredentialsOptions &options)
 Builds SSL ServerCredentials given SSL specific options. More...
 
std::shared_ptr< ServerCredentialsInsecureServerCredentials ()
 Builds insecure server credentials. More...
 

Variables

constexpr long kMaxAuthTokenLifetimeSecs = 3600
 

Detailed Description

An Alarm posts the user-provided tag to its associated completion queue or invokes the user-provided function on expiry or cancellation.

Function Documentation

◆ AccessTokenCredentials()

std::shared_ptr<CallCredentials> grpc_impl::AccessTokenCredentials ( const grpc::string access_token)

Builds access token credentials.

access_token is an oauth2 access token that was fetched using an out of band mechanism.

Warning
Only use these credentials when connecting to a Google endpoint. Using these credentials to connect to any other service may result in this service being able to impersonate your client for requests to Google services.

◆ CompositeCallCredentials()

std::shared_ptr<CallCredentials> grpc_impl::CompositeCallCredentials ( const std::shared_ptr< CallCredentials > &  creds1,
const std::shared_ptr< CallCredentials > &  creds2 
)

Combines two call credentials objects into a composite call credentials.

◆ CompositeChannelCredentials()

std::shared_ptr<ChannelCredentials> grpc_impl::CompositeChannelCredentials ( const std::shared_ptr< ChannelCredentials > &  channel_creds,
const std::shared_ptr< CallCredentials > &  call_creds 
)

Combines a channel credentials and a call credentials into a composite channel credentials.

◆ CreateChannelImpl()

std::shared_ptr<::grpc::Channel> grpc_impl::CreateChannelImpl ( const grpc::string target,
const std::shared_ptr<::grpc::ChannelCredentials > &  creds 
)

Create a new Channel pointing to target.

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.

◆ CreateCustomChannelImpl() [1/2]

std::shared_ptr<::grpc::Channel> grpc_impl::CreateCustomChannelImpl ( const grpc::string target,
const std::shared_ptr< ChannelCredentials > &  creds,
const grpc::ChannelArguments args 
)

◆ CreateCustomChannelImpl() [2/2]

std::shared_ptr<::grpc::Channel> grpc_impl::CreateCustomChannelImpl ( const grpc::string target,
const std::shared_ptr<::grpc::ChannelCredentials > &  creds,
const ::grpc::ChannelArguments args 
)

Create a new custom Channel pointing to target.

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.

◆ CronetChannelCredentials()

std::shared_ptr<ChannelCredentials> grpc_impl::CronetChannelCredentials ( void *  engine)

Credentials for a channel using Cronet.

◆ DefaultHealthCheckServiceEnabled()

bool grpc_impl::DefaultHealthCheckServiceEnabled ( )

Returns whether the default health checking service is enabled.

NOT thread safe.

◆ EnableDefaultHealthCheckService()

void grpc_impl::EnableDefaultHealthCheckService ( bool  enable)

Enable/disable the default health checking service.

This applies to all C++ servers created afterwards. For each server, user can override the default with a HealthCheckServiceServerBuilderOption. NOT thread safe.

◆ GoogleComputeEngineCredentials()

std::shared_ptr<CallCredentials> grpc_impl::GoogleComputeEngineCredentials ( )

Builds credentials for use when running in GCE.

Warning
Only use these credentials when connecting to a Google endpoint. Using these credentials to connect to any other service may result in this service being able to impersonate your client for requests to Google services.

◆ GoogleDefaultCredentials()

std::shared_ptr<ChannelCredentials> grpc_impl::GoogleDefaultCredentials ( )

Builds credentials with reasonable defaults.

Warning
Only use these credentials when connecting to a Google endpoint. Using these credentials to connect to any other service may result in this service being able to impersonate your client for requests to Google services.

◆ GoogleIAMCredentials()

std::shared_ptr<CallCredentials> grpc_impl::GoogleIAMCredentials ( const grpc::string authorization_token,
const grpc::string authority_selector 
)

Builds IAM credentials.

Warning
Only use these credentials when connecting to a Google endpoint. Using these credentials to connect to any other service may result in this service being able to impersonate your client for requests to Google services.

◆ GoogleRefreshTokenCredentials()

std::shared_ptr<CallCredentials> grpc_impl::GoogleRefreshTokenCredentials ( const grpc::string json_refresh_token)

Builds refresh token credentials.

json_refresh_token is the JSON string containing the refresh token along with a client_id and client_secret.

Warning
Only use these credentials when connecting to a Google endpoint. Using these credentials to connect to any other service may result in this service being able to impersonate your client for requests to Google services.

◆ InsecureChannelCredentials()

std::shared_ptr<ChannelCredentials> grpc_impl::InsecureChannelCredentials ( )

Credentials for an unencrypted, unauthenticated channel.

◆ InsecureServerCredentials()

std::shared_ptr<ServerCredentials> grpc_impl::InsecureServerCredentials ( )

Builds insecure server credentials.

◆ MetadataCredentialsFromPlugin()

std::shared_ptr<CallCredentials> grpc_impl::MetadataCredentialsFromPlugin ( std::unique_ptr< MetadataCredentialsPlugin plugin)

◆ ServiceAccountJWTAccessCredentials()

std::shared_ptr<CallCredentials> grpc_impl::ServiceAccountJWTAccessCredentials ( const grpc::string json_key,
long  token_lifetime_seconds = grpc_impl::kMaxAuthTokenLifetimeSecs 
)

Builds Service Account JWT Access credentials.

json_key is the JSON key string containing the client's private key. token_lifetime_seconds is the lifetime in seconds of each Json Web Token (JWT) created with this credentials. It should not exceed kMaxAuthTokenLifetimeSecs or will be cropped to this value.

◆ SslCredentials()

std::shared_ptr<ChannelCredentials> grpc_impl::SslCredentials ( const SslCredentialsOptions options)

Builds SSL Credentials given SSL specific options.

◆ SslServerCredentials()

std::shared_ptr<ServerCredentials> grpc_impl::SslServerCredentials ( const grpc::SslServerCredentialsOptions options)

Builds SSL ServerCredentials given SSL specific options.

Variable Documentation

◆ kMaxAuthTokenLifetimeSecs

constexpr long grpc_impl::kMaxAuthTokenLifetimeSecs = 3600