PHP Class Google\Cloud\GrpcRequestWrapper

Inheritance: use trait RequestWrapperTrait
Show file Open project: GoogleCloudPlatform/gcloud-php Class Usage Examples

Public Methods

Method Description
__construct ( array $config = [] )
send ( callable $request, array $args, array $options = [] ) : array Deliver the request.

Private Methods

Method Description
convertToGoogleException ( Google\GAX\ApiException $ex ) : ServiceException Convert a GAX exception to a Google Exception.
handleResponse ( mixed $response ) : array | null Serializes a gRPC response.

Method Details

__construct() public method

public __construct ( array $config = [] )
$config array [optional] { Configuration options. Please see {@see \Google\Cloud\RequestWrapperTrait::setCommonDefaults()} for the other available options. @type callable $authHttpHandler A handler used to deliver Psr7 requests specifically for authentication. @type CodecInterface $codec A codec used to encode responses. @type array $grpcOptions gRPC specific configuration options passed off to the GAX library. }

send() public method

Deliver the request.
public send ( callable $request, array $args, array $options = [] ) : array
$request callable The request to execute.
$args array The arguments for the request.
$options array [optional] { Request options. @type int $retries Number of retries for a failed request. **Defaults to** `3`. @type array $grpcOptions gRPC specific configuration options. }
return array