Class: TemporalOperationHandler<I, O>
Experimental
A Nexus Operation implementation for operations that interact with Temporal.
Temporal Operation handlers are experimental.
Type Parameters
I
I
O
O
Implements
OperationHandler<I,O>
Constructors
Constructor
new TemporalOperationHandler<
I,O>(options):TemporalOperationHandler<I,O>
Experimental
Parameters
options
object & TemporalOperationHandlerOptions
Returns
TemporalOperationHandler<I, O>
Methods
cancel()
cancel(
ctx,token):Promise<void>
Experimental
Handle requests to cancel an asynchronous operation.
Cancelation of a Nexus operation is:
- asynchronous - returning from this method only confirms that cancelation was notified; the implementation may however choose to process the cancellation at a later time, or to ignore it entirely.
- idempotent - implementations must ignore duplicate cancelations for the same operation.
Parameters
ctx
OperationContext
token
string
Returns
Promise<void>
Implementation of
nexus.OperationHandler.cancel
start()
start(
ctx,input):Promise<HandlerStartOperationResult<O>>
Experimental
Handle requests to start an operation.
Return HandlerStartOperationResultSync to respond successfully inline, or HandlerStartOperationResultAsync to indicate that an asynchronous operation was started. Throw an OperationError to indicate that an operation completed as failed or canceled.
Parameters
ctx
StartOperationContext
input
I
Returns
Promise<HandlerStartOperationResult<O>>
Implementation of
nexus.OperationHandler.start