class GrpcFallbackTransport implements TransportInterface (View source)

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

never
startClientStreamingCall(Call $call, array $options)

{@inheritdoc}

never
startServerStreamingCall(Call $call, array $options)

{@inheritdoc}

never
startBidiStreamingCall(Call $call, array $options)

{@inheritdoc}

close()

{@inheritdoc}

__construct(string $baseUri, callable $httpHandler)

No description

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

Builds a GrpcFallbackTransport.

PromiseInterface
startUnaryCall(Call $call, array $options)

Returns a promise used to execute network requests.

Details

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

No description

Parameters

array $arr

Associative array

array $requiredKeys

List of keys to check for in $arr

Return Value

array

Returns $arr for fluent use

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

No description

Parameters

array $arr

Associative array

array $requiredKeys

List of keys to check for in $arr

Return Value

array

Returns $arr for fluent use

never startClientStreamingCall(Call $call, array $options)

{@inheritdoc}

Parameters

Call $call
array $options

Return Value

never

Exceptions

BadMethodCallException

never startServerStreamingCall(Call $call, array $options)

{@inheritdoc}

Parameters

Call $call
array $options

Return Value

never

Exceptions

BadMethodCallException

never startBidiStreamingCall(Call $call, array $options)

{@inheritdoc}

Parameters

Call $call
array $options

Return Value

never

Exceptions

BadMethodCallException

close()

{@inheritdoc}

__construct(string $baseUri, callable $httpHandler)

No description

Parameters

string $baseUri
callable $httpHandler

A handler used to deliver PSR-7 requests.

static GrpcFallbackTransport build(string $apiEndpoint, array $config = [])

Builds a GrpcFallbackTransport.

Parameters

string $apiEndpoint

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

PromiseInterface startUnaryCall(Call $call, array $options)

Returns a promise used to execute network requests.

Parameters

Call $call
array $options

Return Value

PromiseInterface

Exceptions

ValidationException