GRPC C++  1.42.0
Namespaces | Data Structures | Typedefs | Enumerations | Functions | Variables
grpc 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
 ClientRpcInfo represents the state of a particular RPC as it appears to an interceptor.
 
 internal
 Models a gRPC server.
 
 protobuf
 
 testing
 

Data Structures

class  Alarm
 
class  AsyncGenericService
 
class  AuthContext
 Class encapsulating the Authentication Information. More...
 
class  AuthMetadataProcessor
 Interface allowing custom server-side authorization based on credentials encoded in metadata. More...
 
class  AuthPropertyIterator
 
class  ByteBuffer
 A sequence of bytes. More...
 
class  CallbackGenericService
 CallbackGenericService is the base class for generic services implemented using the callback API and registered through the ServerBuilder using RegisterCallbackGenericService. 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  ChannelInterface
 Codegen interface for grpc::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  ContextAllocator
 A CallbackServerContext allows users to use the contents of the CallbackServerContext or GenericCallbackServerContext structure for the callback API. More...
 
class  CoreCodegen
 Implementation of the core codegen interface. More...
 
class  CoreCodegenInterface
 Interface between the codegen library and the minimal subset of core features required by the generated code. More...
 
class  GenericCallbackServerContext
 
class  GenericServerContext
 
class  GrpcLibraryCodegen
 Classes that require gRPC to be initialized should inherit from this class. More...
 
class  GrpcLibraryInterface
 
class  HealthCheckServiceInterface
 The gRPC server uses this interface to expose the health checking service without depending on protobuf. More...
 
class  HealthCheckServiceServerBuilderOption
 
class  MessageAllocator
 
class  MessageHolder
 
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  ProtoBufferReader
 This is a specialization of the protobuf class ZeroCopyInputStream The principle is to get one chunk of data at a time from the proto layer, with options to backup (re-see some bytes) or skip (forward past some bytes) More...
 
class  ProtoBufferWriter
 This is a specialization of the protobuf class ZeroCopyOutputStream. More...
 
class  ResourceQuota
 ResourceQuota represents a bound on memory and thread usage by the gRPC library. More...
 
class  RpcAllocatorState
 
class  SerializationTraits
 Defines how to serialize and deserialize some type. More...
 
class  SerializationTraits< ByteBuffer, void >
 
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  ServerBuilderPlugin
 This interface is meant for internal usage only. 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. More...
 
class  ServerCredentials
 Wrapper around grpc_server_credentials, a way to authenticate a server. More...
 
class  ServerInitializer
 
class  ServerInterface
 
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...
 
class  Service
 Desriptor of an RPC service and its various RPC methods. More...
 
class  Slice
 A wrapper around grpc_slice. More...
 
struct  SslCredentialsOptions
 Options used to build SslCredentials. More...
 
struct  SslServerCredentialsOptions
 Options to create ServerCredentials with SSL. More...
 
class  Status
 Did it work? If it didn't, why? More...
 
class  string_ref
 This class is a non owning reference to a string. More...
 
class  StubOptions
 Useful interface for generated stubs. More...
 
class  TemplatedGenericStub
 Generic stubs provide a type-unaware interface to call gRPC methods by name. More...
 
class  TimePoint
 If you are trying to use CompletionQueue::AsyncNext with a time class that isn't either gpr_timespec or std::chrono::system_clock::time_point, you will most likely be looking at this comment as your compiler will have fired an error below. More...
 
class  TimePoint< gpr_timespec >
 
class  TimePoint< std::chrono::system_clock::time_point >
 
class  WriteOptions
 Per-message write options. More...
 
class  XdsServerBuilder
 
class  XdsServerServingStatusNotifierInterface
 

Typedefs

typedef ClientAsyncReaderWriter< ByteBuffer, ByteBufferGenericClientAsyncReaderWriter
 
typedef ClientAsyncResponseReader< ByteBufferGenericClientAsyncResponseReader
 
typedef TemplatedGenericStub< grpc::ByteBuffer, grpc::ByteBufferGenericStub
 
typedef ServerAsyncReaderWriter< ByteBuffer, ByteBufferGenericServerAsyncReaderWriter
 
typedef ServerAsyncResponseWriter< ByteBufferGenericServerAsyncResponseWriter
 
typedef ServerAsyncReader< ByteBuffer, ByteBufferGenericServerAsyncReader
 
typedef ServerAsyncWriter< ByteBufferGenericServerAsyncWriter
 
using ServerGenericBidiReactor = ServerBidiReactor< ByteBuffer, ByteBuffer >
 ServerGenericBidiReactor is the reactor class for bidi streaming RPCs invoked on a CallbackGenericService. More...
 
typedef std::pair< string_ref, string_refAuthProperty
 

Enumerations

enum  StatusCode {
  OK = 0, CANCELLED = 1, UNKNOWN = 2, INVALID_ARGUMENT = 3,
  DEADLINE_EXCEEDED = 4, NOT_FOUND = 5, ALREADY_EXISTS = 6, PERMISSION_DENIED = 7,
  UNAUTHENTICATED = 16, RESOURCE_EXHAUSTED = 8, FAILED_PRECONDITION = 9, ABORTED = 10,
  OUT_OF_RANGE = 11, UNIMPLEMENTED = 12, INTERNAL = 13, UNAVAILABLE = 14,
  DATA_LOSS = 15, DO_NOT_USE = -1
}
 

Functions

std::shared_ptr< ChannelCreateChannelInternal (const std::string &host, grpc_channel *c_channel, std::vector< std::unique_ptr< experimental::ClientInterceptorFactoryInterface >> interceptor_creators)
 
std::shared_ptr< ChannelCreateChannel (const grpc::string &target, const std::shared_ptr< ChannelCredentials > &creds)
 Create a new Channel pointing to target. More...
 
std::shared_ptr< ChannelCreateCustomChannel (const grpc::string &target, const std::shared_ptr< ChannelCredentials > &creds, const ChannelArguments &args)
 Create a new custom Channel pointing to target. More...
 
std::string Version ()
 Return gRPC library version. 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::unique_ptr< ServerBuilderOptionMakeChannelArgumentOption (const std::string &name, const std::string &value)
 
std::unique_ptr< ServerBuilderOptionMakeChannelArgumentOption (const std::string &name, int value)
 
std::shared_ptr< const AuthContextCreateAuthContext (grpc_call *call)
 
template<class ProtoBufferWriter , class T >
Status GenericSerialize (const grpc::protobuf::MessageLite &msg, ByteBuffer *bb, bool *own_buffer)
 
template<class ProtoBufferReader , class T >
Status GenericDeserialize (ByteBuffer *buffer, grpc::protobuf::MessageLite *msg)
 
grpc::string_ref StringRefFromSlice (const grpc_slice *slice)
 
std::string StringFromCopiedSlice (grpc_slice slice)
 
grpc_slice SliceReferencingString (const std::string &str)
 
grpc_slice SliceFromCopiedString (const std::string &str)
 
bool operator== (string_ref x, string_ref y)
 Comparison operators. More...
 
bool operator!= (string_ref x, string_ref y)
 
bool operator< (string_ref x, string_ref y)
 
bool operator<= (string_ref x, string_ref y)
 
bool operator> (string_ref x, string_ref y)
 
bool operator>= (string_ref x, string_ref y)
 
std::ostream & operator<< (std::ostream &out, const string_ref &string)
 
void Timepoint2Timespec (const std::chrono::system_clock::time_point &from, gpr_timespec *to)
 
void TimepointHR2Timespec (const std::chrono::high_resolution_clock::time_point &from, gpr_timespec *to)
 
std::chrono::system_clock::time_point Timespec2Timepoint (gpr_timespec t)
 
std::shared_ptr< ChannelCreateCustomChannel (const grpc::string &target, const std::shared_ptr< grpc::ChannelCredentials > &creds, const grpc::ChannelArguments &args)
 
std::shared_ptr< ChannelCredentialsXdsCredentials (const std::shared_ptr< ChannelCredentials > &fallback_creds)
 Builds XDS Credentials. More...
 
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=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< CallCredentialsExternalAccountCredentials (const grpc::string &json_string, const std::vector< grpc::string > &scopes)
 Builds External Account credentials. More...
 
std::shared_ptr< ServerCredentialsXdsServerCredentials (const std::shared_ptr< ServerCredentials > &fallback_credentials)
 Builds Xds ServerCredentials given fallback credentials. More...
 
std::shared_ptr< ServerCredentialsSslServerCredentials (const grpc::SslServerCredentialsOptions &options)
 Builds SSL ServerCredentials given SSL specific options. More...
 
std::shared_ptr< ServerCredentialsInsecureServerCredentials ()
 

Variables

const char kHealthCheckServiceInterfaceArg []
 
CoreCodegenInterfaceg_core_codegen_interface
 
GrpcLibraryInterfaceg_glip
 Initialized by grpc::GrpcLibraryInitializer from <grpcpp/impl/grpc_library.h> More...
 
const int kProtoBufferWriterMaxBufferLength = 1024 * 1024
 
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.

This header provides serialization and deserialization between gRPC messages serialized using protobuf and the C++ objects they represent.

This header provides an object that writes bytes directly into a grpc::ByteBuffer, via the ZeroCopyOutputStream interface.

This header provides an object that reads bytes directly from a grpc::ByteBuffer, via the ZeroCopyInputStream interface.

Typedef Documentation

◆ AuthProperty

◆ GenericClientAsyncReaderWriter

◆ GenericClientAsyncResponseReader

◆ GenericServerAsyncReader

◆ GenericServerAsyncReaderWriter

◆ GenericServerAsyncResponseWriter

◆ GenericServerAsyncWriter

◆ GenericStub

◆ ServerGenericBidiReactor

ServerGenericBidiReactor is the reactor class for bidi streaming RPCs invoked on a CallbackGenericService.

It is just a ServerBidi reactor with ByteBuffer arguments.

Enumeration Type Documentation

◆ StatusCode

Enumerator
OK 

Not an error; returned on success.

CANCELLED 

The operation was cancelled (typically by the caller).

UNKNOWN 

Unknown error.

An example of where this error may be returned is if a Status value received from another address space belongs to an error-space that is not known in this address space. Also errors raised by APIs that do not return enough error information may be converted to this error.

INVALID_ARGUMENT 

Client specified an invalid argument.

Note that this differs from FAILED_PRECONDITION. INVALID_ARGUMENT indicates arguments that are problematic regardless of the state of the system (e.g., a malformed file name).

DEADLINE_EXCEEDED 

Deadline expired before operation could complete.

For operations that change the state of the system, this error may be returned even if the operation has completed successfully. For example, a successful response from a server could have been delayed long enough for the deadline to expire.

NOT_FOUND 

Some requested entity (e.g., file or directory) was not found.

ALREADY_EXISTS 

Some entity that we attempted to create (e.g., file or directory) already exists.

PERMISSION_DENIED 

The caller does not have permission to execute the specified operation.

PERMISSION_DENIED must not be used for rejections caused by exhausting some resource (use RESOURCE_EXHAUSTED instead for those errors). PERMISSION_DENIED must not be used if the caller can not be identified (use UNAUTHENTICATED instead for those errors).

UNAUTHENTICATED 

The request does not have valid authentication credentials for the operation.

RESOURCE_EXHAUSTED 

Some resource has been exhausted, perhaps a per-user quota, or perhaps the entire file system is out of space.

FAILED_PRECONDITION 

Operation was rejected because the system is not in a state required for the operation's execution.

For example, directory to be deleted may be non-empty, an rmdir operation is applied to a non-directory, etc.

A litmus test that may help a service implementor in deciding between FAILED_PRECONDITION, ABORTED, and UNAVAILABLE: (a) Use UNAVAILABLE if the client can retry just the failing call. (b) Use ABORTED if the client should retry at a higher-level (e.g., restarting a read-modify-write sequence). (c) Use FAILED_PRECONDITION if the client should not retry until the system state has been explicitly fixed. E.g., if an "rmdir" fails because the directory is non-empty, FAILED_PRECONDITION should be returned since the client should not retry unless they have first fixed up the directory by deleting files from it. (d) Use FAILED_PRECONDITION if the client performs conditional REST Get/Update/Delete on a resource and the resource on the server does not match the condition. E.g., conflicting read-modify-write on the same resource.

ABORTED 

The operation was aborted, typically due to a concurrency issue like sequencer check failures, transaction aborts, etc.

See litmus test above for deciding between FAILED_PRECONDITION, ABORTED, and UNAVAILABLE.

OUT_OF_RANGE 

Operation was attempted past the valid range.

E.g., seeking or reading past end of file.

Unlike INVALID_ARGUMENT, this error indicates a problem that may be fixed if the system state changes. For example, a 32-bit file system will generate INVALID_ARGUMENT if asked to read at an offset that is not in the range [0,2^32-1], but it will generate OUT_OF_RANGE if asked to read from an offset past the current file size.

There is a fair bit of overlap between FAILED_PRECONDITION and OUT_OF_RANGE. We recommend using OUT_OF_RANGE (the more specific error) when it applies so that callers who are iterating through a space can easily look for an OUT_OF_RANGE error to detect when they are done.

UNIMPLEMENTED 

Operation is not implemented or not supported/enabled in this service.

INTERNAL 

Internal errors.

Means some invariants expected by underlying System has been broken. If you see one of these errors, Something is very broken.

UNAVAILABLE 

The service is currently unavailable.

This is a most likely a transient condition and may be corrected by retrying with a backoff. Note that it is not always safe to retry non-idempotent operations.

Warning
Although data MIGHT not have been transmitted when this status occurs, there is NOT A GUARANTEE that the server has not seen anything. So in general it is unsafe to retry on this status code if the call is non-idempotent.

See litmus test above for deciding between FAILED_PRECONDITION, ABORTED, and UNAVAILABLE.

DATA_LOSS 

Unrecoverable data loss or corruption.

DO_NOT_USE 

Force users to include a default branch:

Function Documentation

◆ AccessTokenCredentials()

std::shared_ptr<CallCredentials> grpc::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::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::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.

◆ CreateAuthContext()

std::shared_ptr<const AuthContext> grpc::CreateAuthContext ( grpc_call call)

◆ CreateChannel()

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

◆ CreateChannelInternal()

std::shared_ptr<Channel> grpc::CreateChannelInternal ( const std::string &  host,
grpc_channel c_channel,
std::vector< std::unique_ptr< experimental::ClientInterceptorFactoryInterface >>  interceptor_creators 
)

◆ CreateCustomChannel() [1/2]

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

◆ CreateCustomChannel() [2/2]

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

◆ DefaultHealthCheckServiceEnabled()

bool grpc::DefaultHealthCheckServiceEnabled ( )

Returns whether the default health checking service is enabled.

NOT thread safe.

◆ EnableDefaultHealthCheckService()

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

◆ ExternalAccountCredentials()

std::shared_ptr<CallCredentials> grpc::ExternalAccountCredentials ( const grpc::string &  json_string,
const std::vector< grpc::string > &  scopes 
)

Builds External Account credentials.

json_string is the JSON string containing the credentials options. scopes contains the scopes to be binded with the credentials.

◆ GenericDeserialize()

template<class ProtoBufferReader , class T >
Status grpc::GenericDeserialize ( ByteBuffer buffer,
grpc::protobuf::MessageLite msg 
)

◆ GenericSerialize()

template<class ProtoBufferWriter , class T >
Status grpc::GenericSerialize ( const grpc::protobuf::MessageLite msg,
ByteBuffer bb,
bool *  own_buffer 
)

◆ GoogleComputeEngineCredentials()

std::shared_ptr<CallCredentials> grpc::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::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::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::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::InsecureChannelCredentials ( )

Credentials for an unencrypted, unauthenticated channel.

◆ InsecureServerCredentials()

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

◆ MakeChannelArgumentOption() [1/2]

std::unique_ptr<ServerBuilderOption> grpc::MakeChannelArgumentOption ( const std::string &  name,
const std::string &  value 
)

◆ MakeChannelArgumentOption() [2/2]

std::unique_ptr<ServerBuilderOption> grpc::MakeChannelArgumentOption ( const std::string &  name,
int  value 
)

◆ MetadataCredentialsFromPlugin()

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

◆ operator!=()

bool grpc::operator!= ( string_ref  x,
string_ref  y 
)
inline

◆ operator<()

bool grpc::operator< ( string_ref  x,
string_ref  y 
)
inline

◆ operator<<()

std::ostream& grpc::operator<< ( std::ostream &  out,
const string_ref string 
)
inline

◆ operator<=()

bool grpc::operator<= ( string_ref  x,
string_ref  y 
)
inline

◆ operator==()

bool grpc::operator== ( string_ref  x,
string_ref  y 
)
inline

Comparison operators.

◆ operator>()

bool grpc::operator> ( string_ref  x,
string_ref  y 
)
inline

◆ operator>=()

bool grpc::operator>= ( string_ref  x,
string_ref  y 
)
inline

◆ ServiceAccountJWTAccessCredentials()

std::shared_ptr<CallCredentials> grpc::ServiceAccountJWTAccessCredentials ( const grpc::string &  json_key,
long  token_lifetime_seconds = 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.

◆ SliceFromCopiedString()

grpc_slice grpc::SliceFromCopiedString ( const std::string &  str)
inline

◆ SliceReferencingString()

grpc_slice grpc::SliceReferencingString ( const std::string &  str)
inline

◆ SslCredentials()

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

Builds SSL Credentials given SSL specific options.

◆ SslServerCredentials()

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

Builds SSL ServerCredentials given SSL specific options.

◆ StringFromCopiedSlice()

std::string grpc::StringFromCopiedSlice ( grpc_slice  slice)
inline

◆ StringRefFromSlice()

grpc::string_ref grpc::StringRefFromSlice ( const grpc_slice slice)
inline

◆ Timepoint2Timespec()

void grpc::Timepoint2Timespec ( const std::chrono::system_clock::time_point &  from,
gpr_timespec to 
)

◆ TimepointHR2Timespec()

void grpc::TimepointHR2Timespec ( const std::chrono::high_resolution_clock::time_point &  from,
gpr_timespec to 
)

◆ Timespec2Timepoint()

std::chrono::system_clock::time_point grpc::Timespec2Timepoint ( gpr_timespec  t)

◆ Version()

std::string grpc::Version ( )

Return gRPC library version.

◆ XdsCredentials()

std::shared_ptr<ChannelCredentials> grpc::XdsCredentials ( const std::shared_ptr< ChannelCredentials > &  fallback_creds)

Builds XDS Credentials.

◆ XdsServerCredentials()

std::shared_ptr<ServerCredentials> grpc::XdsServerCredentials ( const std::shared_ptr< ServerCredentials > &  fallback_credentials)

Builds Xds ServerCredentials given fallback credentials.

Variable Documentation

◆ g_core_codegen_interface

CoreCodegenInterface * grpc::g_core_codegen_interface

◆ g_glip

GrpcLibraryInterface* grpc::g_glip

Initialized by grpc::GrpcLibraryInitializer from <grpcpp/impl/grpc_library.h>

◆ kHealthCheckServiceInterfaceArg

const char grpc::kHealthCheckServiceInterfaceArg[]
Initial value:
=
"grpc.health_check_service_interface"

◆ kMaxAuthTokenLifetimeSecs

constexpr long grpc::kMaxAuthTokenLifetimeSecs = 3600
constexpr

◆ kProtoBufferWriterMaxBufferLength

const int grpc::kProtoBufferWriterMaxBufferLength = 1024 * 1024