class GrpcFallbackTransport implements TransportInterface

A transport that sends protobuf over HTTP 1.1 that can be used when full gRPC support is not available.

Traits

Provides helper methods for service address handling.
A trait for shared functionality between transports that support only unary RPCs using simple HTTP requests.

Methods

static array
validate(array $arr, array $requiredKeys)

No description

static array
validateNotNull(array $arr, array $requiredKeys)

No description

startClientStreamingCall(Call $call, array $options)

{@inheritdoc}

startServerStreamingCall(Call $call, array $options)

{@inheritdoc}

startBidiStreamingCall(Call $call, array $options)

{@inheritdoc}

close()

{@inheritdoc}

__construct(string $baseUri, callable $httpHandler)

No description

build(string $serviceAddress, array $config = [])

Builds a GrpcFallbackTransport.

PromiseInterface
startUnaryCall(Call $call, array $options)

Returns a promise used to execute network requests.

Details

in ValidationTrait at line 41
static array validate(array $arr, array $requiredKeys)

Parameters

array $arr Associative array
array $requiredKeys List of keys to check for in $arr

Return Value

array Returns $arr for fluent use

in ValidationTrait at line 51
static array validateNotNull(array $arr, array $requiredKeys)

Parameters

array $arr Associative array
array $requiredKeys List of keys to check for in $arr

Return Value

array Returns $arr for fluent use

startClientStreamingCall(Call $call, array $options)

{@inheritdoc}

Parameters

Call $call
array $options

Exceptions

BadMethodCallException

startServerStreamingCall(Call $call, array $options)

{@inheritdoc}

Parameters

Call $call
array $options

Exceptions

BadMethodCallException

startBidiStreamingCall(Call $call, array $options)

{@inheritdoc}

Parameters

Call $call
array $options

Exceptions

BadMethodCallException

close()

{@inheritdoc}

at line 63
__construct(string $baseUri, callable $httpHandler)

Parameters

string $baseUri
callable $httpHandler A handler used to deliver PSR-7 requests.

at line 85
static GrpcFallbackTransport build(string $serviceAddress, array $config = [])

Builds a GrpcFallbackTransport.

Parameters

string $serviceAddress The address of the API remote host, for example "example.googleapis.com".
array $config { Config options used to construct the grpc-fallback transport.

@type callable $httpHandler A handler used to deliver PSR-7 requests. }

Return Value

GrpcFallbackTransport

Exceptions

ValidationException

at line 98
PromiseInterface startUnaryCall(Call $call, array $options)

Returns a promise used to execute network requests.

Parameters

Call $call
array $options

Return Value

PromiseInterface