Google API Core Client - Class CallOptions (1.36.0)

Reference documentation and code samples for the Google API Core Client class CallOptions.

The CallOptions class provides typing to the associative array of options passed to transport RPC methods. See Google\ApiCore\Transport\TransportInterface::startUnaryCall(), Google\ApiCore\Transport\TransportInterface::startBidiStreamingCall(), Google\ApiCore\Transport\TransportInterface::startClientStreamingCall(), and Google\ApiCore\Transport\TransportInterface::startServerStreamingCall().

Namespace

Google \ ApiCore \ Options

Methods

__construct

Parameters
Name Description
options array

Call options

↳ array array<>

↳ timeoutMillis int

The timeout in milliseconds for the call.

↳ transportOptions array

Transport-specific call options. See CallOptions::setTransportOptions.

↳ retrySettings RetrySettings|array

A retry settings override for the call. If $retrySettings is an array, the settings will be merged with the method's default retry settings. If $retrySettings is a RetrySettings object, that object will be used instead of the method defaults.

setHeaders

Parameter
Name Description
headers array

setTimeoutMillis

Parameter
Name Description
timeoutMillis int|null

setTransportOptions

Parameters
Name Description
transportOptions array

Transport-specific call-time options.

↳ grpcOptions array

Key-value pairs for gRPC-specific options passed as the $options argument to Grpc\BaseStub request methods. Current options are call_credentials_callback and timeout. NOTE: This library sets call_credentials_callback using Google\ApiCore\CredentialsWrapper, and timeout using the timeoutMillis call option, so these options are not very useful.

↳ grpcFallbackOptions array

Key-value pairs for gRPC fallback specific options passed as the $options argument to the $httpHandler callable. By default these are passed to GuzzleHttp\Client as request options. See {@link https://docs.guzzlephp.org/en/stable/request-options.html}.

↳ restOptions array

Key-value pairs for REST-specific options passed as the $options argument to the $httpHandler callable. By default these are passed to GuzzleHttp\Client as request options. See {@link https://docs.guzzlephp.org/en/stable/request-options.html}.

setTransportSpecificOptions

Parameter
Name Description
transportSpecificOptions array

setRetrySettings

Parameter
Name Description
retrySettings Google\ApiCore\RetrySettings|array|null