Enumerations

enum InterceptionHookPoints
Name Value
PRE_SEND_INITIAL_METADATA 0
PRE_SEND_MESSAGE 1
POST_SEND_MESSAGE 2
PRE_SEND_STATUS 3
PRE_SEND_CLOSE 4
PRE_RECV_INITIAL_METADATA 5
PRE_RECV_MESSAGE 6
PRE_RECV_STATUS 7
POST_RECV_INITIAL_METADATA 8
POST_RECV_MESSAGE 9
POST_RECV_STATUS 10
POST_RECV_CLOSE 11
PRE_SEND_CANCEL 12
NUM_INTERCEPTION_HOOKS 13

An enumeration of different possible points at which the

method of the

interface may be called. Any given call

to

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.

Defined at line 56 of file ../../third_party/grpc-migrating/src/include/grpcpp/support/interceptor.h

Records

Functions

  • void 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> 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

    pointing to

    with

    being invoked per call.

    Parameters

    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> CreateCustomInsecureChannelWithInterceptorsFromFd (const std::string & target, int fd, const grpc::ChannelArguments & args, std::vector<std::unique_ptr<grpc::experimental::ClientInterceptorFactoryInterface>> interceptor_creators)

    Create a new

    communicating over given file descriptor with custom

    channel arguments.

    Parameters

    target The name of the target.
    fd The file descriptor representing a socket.
    args Options for channel creation.
    interceptor_creators Vector of interceptor factory objects.
  • std::shared_ptr<ServerCredentials> AltsServerCredentials (const AltsServerCredentialsOptions & options)

    Builds ALTS ServerCredentials given ALTS specific options

  • std::shared_ptr<ServerCredentials> LocalServerCredentials (grpc_local_connect_type type)
  • std::shared_ptr<ServerCredentials> TlsServerCredentials (const experimental::TlsServerCredentialsOptions & options)

    Builds TLS ServerCredentials given TLS options.

  • void RegisterGlobalClientInterceptorFactory (ClientInterceptorFactoryInterface * factory)

    PLEASE DO NOT USE THIS. ALWAYS PREFER PER CHANNEL INTERCEPTORS OVER A GLOBAL

    INTERCEPTOR. IF USAGE IS ABSOLUTELY NECESSARY, PLEASE READ THE SAFETY NOTES.

    Registers a global client interceptor factory object, which is used for all

    RPCs made in this process. The application is responsible for maintaining the

    life of the object while gRPC operations are in progress. The global

    interceptor factory should only be registered once at the start of the

    process before any gRPC operations have begun.

  • void TestOnlyResetGlobalClientInterceptorFactory ()

    For testing purposes only

  • 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. This environment variable points to the path of a JSON file

    comforming to the schema described above.

  • 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

  • std::shared_ptr<ChannelCredentials> LocalCredentials (grpc_local_connect_type type)

    Builds Local Credentials.

  • std::shared_ptr<ChannelCredentials> TlsCredentials (const TlsChannelCredentialsOptions & options)

    Builds TLS Credentials given TLS options.