Documentation

BaseClient
in package
implements ServiceClientInterface

AbstractYes

Table of Contents

Interfaces

ServiceClientInterface

Constants

RETRYABLE_ERRORS  = [\Temporal\Client\GRPC\StatusCode::RESOURCE_EXHAUSTED, \Temporal\Client\GRPC\StatusCode::UNAVAILABLE, \Temporal\Client\GRPC\StatusCode::UNKNOWN]

Properties

$apiKey  : Stringable|string
$connection  : Connection
$context  : ContextInterface
$invokePipeline  : null|callable(string $method, object $arg, ContextInterface $ctx): object

Methods

__construct()  : mixed
close()  : void
Close the communication channel associated with this stub.
create()  : static
createSSL()  : static
getConnection()  : ConnectionInterface
Note: Experimental
getContext()  : ContextInterface
getServerCapabilities()  : ServerCapabilities|null
setServerCapabilities()  : void
withAuthKey()  : static
Set the authentication token for the service client.
withContext()  : static
withInterceptorPipeline()  : static
invoke()  : mixed
call()  : object
Call a gRPC method.
usleep()  : void

Constants

RETRYABLE_ERRORS

public mixed RETRYABLE_ERRORS = [\Temporal\Client\GRPC\StatusCode::RESOURCE_EXHAUSTED, \Temporal\Client\GRPC\StatusCode::UNAVAILABLE, \Temporal\Client\GRPC\StatusCode::UNKNOWN]

Properties

Methods

__construct()

public final __construct(WorkflowServiceClient|callable(): WorkflowServiceClient $workflowService) : mixed
Parameters
$workflowService : WorkflowServiceClient|callable(): WorkflowServiceClient

Service Client or its factory

Tags
private

Use static factory methods instead

see
self::create()
see
self::createSSL()

close()

Close the communication channel associated with this stub.

public close() : void

create()

public static create(non-empty-string $address) : static
Parameters
$address : non-empty-string

Temporal service address in format host:port

Tags
psalm-suppress

UndefinedClass

Return values
static

createSSL()

public static createSSL(non-empty-string $address[, non-empty-string|null $crt = null ][, non-empty-string|null $clientKey = null ][, non-empty-string|null $clientPem = null ][, non-empty-string|null $overrideServerName = null ]) : static
Parameters
$address : non-empty-string

Temporal service address in format host:port

$crt : non-empty-string|null = null

Root certificates string or file in PEM format. If null provided, default gRPC root certificates are used.

$clientKey : non-empty-string|null = null

Client private key string or file in PEM format.

$clientPem : non-empty-string|null = null

Client certificate chain string or file in PEM format.

$overrideServerName : non-empty-string|null = null
Tags
psalm-suppress

UndefinedClass

psalm-suppress

UnusedVariable

Return values
static

withAuthKey()

Set the authentication token for the service client.

public withAuthKey(Stringable|string $key) : static

This is the equivalent of providing an "Authorization" header with "Bearer " + the given key. This will overwrite any "Authorization" header that may be on the context before each request to the Temporal service. You may pass your own Stringable implementation to be able to change the key dynamically.

Parameters
$key : Stringable|string
Tags
link
https://docs.temporal.io/cloud/api-keys
Return values
static

invoke()

protected invoke(non-empty-string $method, object $arg[, ContextInterface|null $ctx = null ]) : mixed
Parameters
$method : non-empty-string

RPC method name

$arg : object
$ctx : ContextInterface|null = null
Tags
throws
ClientException

call()

Call a gRPC method.

private call(non-empty-string $method, object $arg, ContextInterface $ctx) : object

Used in withInterceptorPipeline()

Parameters
$method : non-empty-string
$arg : object
$ctx : ContextInterface
Tags
throws
Exception
Return values
object

usleep()

private usleep(int<0, max> $param) : void
Parameters
$param : int<0, max>

Delay in microseconds


        
On this page

Search results