Interface: ConnectionLike
Connection interface used by high level SDK clients.
Properties
operatorService
operatorService:
OperatorService
plugins
plugins:
ConnectionPlugin[]
workflowService
workflowService:
WorkflowService
Methods
close()
close():
Promise<void>
Returns
Promise<void>
ensureConnected()
ensureConnected():
Promise<void>
Returns
Promise<void>
withAbortSignal()
withAbortSignal<
R>(abortSignal,fn):Promise<R>
Set an AbortSignal that, when aborted, cancels any ongoing service requests executed in
fn's scope. This will locally result in the request call throwing a grpc.ServiceError|ServiceError
with code grpc.status.CANCELLED|CANCELLED; see isGrpcCancelledError.
Type Parameters
R
R
Parameters
abortSignal
AbortSignal
fn
() => Promise<R>
Returns
Promise<R>
value returned from fn
See
https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal
withDeadline()
withDeadline<
R>(deadline,fn):Promise<R>
Set a deadline for any service requests executed in fn's scope.
The deadline is a point in time after which any pending gRPC request will be considered as failed; this will locally result in the request call throwing a grpc.ServiceError|ServiceError with code grpc.status.DEADLINE_EXCEEDED|DEADLINE_EXCEEDED; see isGrpcDeadlineError.
It is stronly recommended to explicitly set deadlines. If no deadline is set, then it is possible for the client to end up waiting forever for a response.
This method is only a convenience wrapper around Connection.withDeadline.
Type Parameters
R
R
Parameters
deadline
number | Date
a point in time after which the request will be considered as failed; either a Date object, or a number of milliseconds since the Unix epoch (UTC).
fn
() => Promise<R>
Returns
Promise<R>
the value returned from fn
See
https://grpc.io/docs/guides/deadlines/
withMetadata()
withMetadata<
R>(metadata,fn):Promise<R>
Set metadata for any service requests executed in fn's scope.
Type Parameters
R
R
Parameters
metadata
fn
() => Promise<R>
Returns
Promise<R>
returned value of fn