GRPC C++  1.30.0
Namespaces | Data Structures | Typedefs | 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
 
 internal
 Actual implementation of bi-directional streaming.
 

Data Structures

class  Alarm
 
class  AuthMetadataProcessor
 Interface allowing custom server-side authorization based on credentials encoded in metadata. More...
 
class  CallbackServerContext
 
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  ClientAsyncReader
 Async client-side API for doing server-streaming RPCs, where the incoming message stream coming from the server has messages of type R. More...
 
class  ClientAsyncReaderInterface
 
class  ClientAsyncReaderWriter
 Async client-side interface for bi-directional streaming, where the outgoing message stream going to the server has messages of type W, and the incoming message stream coming from the server has messages of type R. More...
 
class  ClientAsyncReaderWriterInterface
 Async client-side interface for bi-directional streaming, where the client-to-server message stream has messages of type W, and the server-to-client message stream has messages of type R. More...
 
class  ClientAsyncResponseReader
 Async API for client-side unary RPCs, where the message response received from the server is of type R. More...
 
class  ClientAsyncResponseReaderInterface
 An interface relevant for async client side unary RPCs (which send one request message to a server and receive one response message). More...
 
class  ClientAsyncWriter
 Async API on the client side for doing client-streaming RPCs, where the outgoing message stream going to the server contains messages of type W. More...
 
class  ClientAsyncWriterInterface
 Common interface for client side asynchronous writing. More...
 
class  ClientBidiReactor
 ClientBidiReactor is the interface for a bidirectional streaming RPC. More...
 
class  ClientCallbackReader
 
class  ClientCallbackReaderWriter
 
class  ClientCallbackUnary
 
class  ClientCallbackWriter
 
class  ClientContext
 A ClientContext allows the person implementing a service client to: More...
 
class  ClientReader
 Synchronous (blocking) client-side API for doing server-streaming RPCs, where the stream of messages coming from the server has messages of type R. More...
 
class  ClientReaderInterface
 Client-side interface for streaming reads of message of type R. More...
 
class  ClientReaderWriter
 Synchronous (blocking) client-side API for bi-directional streaming RPCs, where the outgoing message stream coming from the client has messages of type W, and the incoming messages stream coming from the server has messages of type R. More...
 
class  ClientReaderWriterInterface
 Client-side interface for bi-directional streaming with client-to-server stream messages of type W and server-to-client stream messages of type R. More...
 
class  ClientReadReactor
 ClientReadReactor is the interface for a server-streaming RPC. More...
 
class  ClientUnaryReactor
 ClientUnaryReactor is a reactor-style interface for a unary RPC. More...
 
class  ClientWriter
 Synchronous (blocking) client-side API for doing client-streaming RPCs, where the outgoing message stream coming from the client has messages of type W. More...
 
class  ClientWriteReactor
 ClientWriteReactor is the interface for a client-streaming RPC. More...
 
class  ClientWriterInterface
 Client-side interface for streaming writes of message type W. More...
 
class  CompletionQueue
 A thin wrapper around grpc_completion_queue (see src/core/lib/surface/completion_queue.h). 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  ServerAsyncReader
 Async server-side API for doing client-streaming RPCs, where the incoming message stream from the client has messages of type R, and the single response message sent from the server is type W. More...
 
class  ServerAsyncReaderInterface
 
class  ServerAsyncReaderWriter
 Async server-side API for doing bidirectional streaming RPCs, where the incoming message stream coming from the client has messages of type R, and the outgoing message stream coming from the server has messages of type W. More...
 
class  ServerAsyncReaderWriterInterface
 Server-side interface for asynchronous bi-directional streaming. More...
 
class  ServerAsyncResponseWriter
 Async server-side API for handling unary calls, where the single response message sent to the client is of type W. More...
 
class  ServerAsyncWriter
 Async server-side API for doing server streaming RPCs, where the outgoing message stream from the server has messages of type W. More...
 
class  ServerAsyncWriterInterface
 
class  ServerBidiReactor
 ServerBidiReactor is the interface for a bidirectional streaming RPC. 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  ServerCallbackReader
 
class  ServerCallbackReaderWriter
 
class  ServerCallbackUnary
 
class  ServerCallbackWriter
 
class  ServerCompletionQueue
 A specific type of completion queue used by the processing of notifications by servers. More...
 
class  ServerContext
 A ServerContext or CallbackServerContext allows the code implementing a service handler to: More...
 
class  ServerContextBase
 Base class of ServerContext. Experimental until callback API is final. More...
 
class  ServerCredentials
 Wrapper around grpc_server_credentials, a way to authenticate a server. More...
 
class  ServerInitializer
 
class  ServerReader
 Synchronous (blocking) server-side API for doing client-streaming RPCs, where the incoming message stream coming from the client has messages of type R. More...
 
class  ServerReaderInterface
 Server-side interface for streaming reads of message of type R. More...
 
class  ServerReaderWriter
 Synchronous (blocking) server-side API for a bidirectional streaming call, where the incoming message stream coming from the client has messages of type R, and the outgoing message streaming coming from the server has messages of type W. More...
 
class  ServerReaderWriterInterface
 Server-side interface for bi-directional streaming. More...
 
class  ServerReadReactor
 ServerReadReactor is the interface for a client-streaming RPC. More...
 
class  ServerSplitStreamer
 A class to represent a flow-controlled server-side streaming call. More...
 
class  ServerUnaryReactor
 
class  ServerUnaryStreamer
 A class to represent a flow-controlled unary call. More...
 
class  ServerWriter
 Synchronous (blocking) server-side API for doing for doing a server-streaming RPCs, where the outgoing message stream coming from the server has messages of type W. More...
 
class  ServerWriteReactor
 ServerWriteReactor is the interface for a server-streaming RPC. More...
 
class  ServerWriterInterface
 Server-side interface for streaming writes of message of type W. More...
 
struct  SslCredentialsOptions
 Options used to build SslCredentials. More...
 
class  TemplatedGenericStub
 Generic stubs provide a type-unaware interface to call gRPC methods by name. More...
 

Typedefs

typedef TemplatedGenericStub< grpc::ByteBuffer, grpc::ByteBufferGenericStub
 

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< ChannelCreateCustomChannelImpl (const grpc::string &target, const std::shared_ptr< ChannelCredentials > &creds, const 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< 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.

Typedef Documentation

◆ GenericStub

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<Channel> grpc_impl::CreateCustomChannelImpl ( const grpc::string target,
const std::shared_ptr< ChannelCredentials > &  creds,
const 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.

◆ 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
constexpr