Reference documentation and code samples for the Google API Core Client class GrpcTransport.
A gRPC based transport implementation.
Namespace
Google \ ApiCore \ TransportMethods
__construct
hostname
string
opts
array
- 'update_metadata': (optional) a callback function which takes in a metadata array, and returns an updated metadata array
- 'grpc.primary_user_agent': (optional) a user-agent string
channel
Grpc\Channel
An already created Channel object (optional)
interceptors
array< Grpc\Interceptor
>|array< Grpc\UnaryInterceptorInterface
>
EXPERIMENTAL
Interceptors used to intercept RPC invocations before a call starts.
Please note that implementations of Grpc\UnaryInterceptorInterface
are
considered deprecated and support will be removed in a future
release. To prepare for this, please take the time to convert UnaryInterceptorInterface
implementations over to a class which
extends Grpc\Interceptor
.
startBidiStreamingCall
Starts a bidi streaming call.
startClientStreamingCall
Starts a client streaming call.
startServerStreamingCall
Starts a server streaming call.
startUnaryCall
Returns a promise used to execute network requests.
static::build
Builds a GrpcTransport.
apiEndpoint
string
The address of the API remote host, for example "example.googleapis.com. May also include the port, for example "example.googleapis.com:443"
config
array
Config options used to construct the gRPC transport.
↳ stubOpts
array
Options used to construct the gRPC stub (see {@link https://grpc.github.io/grpc/core/group__grpc__arg__keys.html}).
↳ channel
Channel
Grpc channel to be used.
↳ interceptors
Interceptor[]|UnaryInterceptorInterface[]
EXPERIMENTAL
Interceptors used to intercept RPC invocations before a call starts. Please note that implementations of Grpc\UnaryInterceptorInterface
are considered deprecated and support will be removed in a future release. To prepare for this, please take the time to convert UnaryInterceptorInterface
implementations over to a class which extends Grpc\Interceptor
.
↳ clientCertSource
callable
A callable which returns the client cert as a string.