class ApiProxy (View source)

Methods

static 
makeSyncCall(string $package, string $call_name, string $request, string $response, double $deadline = null)

Makes a synchronous RPC call.

static 
setApiProxy(resource $apiProxy)

Set the API Proxy instance used to make the RPC call. Allows for mocking in tests.

Details

static makeSyncCall(string $package, string $call_name, string $request, string $response, double $deadline = null)

Makes a synchronous RPC call.

Parameters

string $package Package to call
string $call_name Specific RPC call to make
string $request Request proto, serialised to string
string $response Response proto string to populate
double $deadline Optional deadline for the RPC call

static setApiProxy(resource $apiProxy)

Set the API Proxy instance used to make the RPC call. Allows for mocking in tests.

Parameters

resource $apiProxy API Proxy instance to use