signal

abstract suspend fun <T : Any> signal(name: String, typeTag: TypeTag<T>): DurableFuture<T>

Create a DurableFuture waiting on a named signal targeting the current invocation.

Signals are identified by (invocationId, name). The resolution can arrive before or after the handler starts waiting on the signal — there's no need to pre-register.

Another invocation can resolve or reject the signal using signalHandle.

Return

a DurableFuture that resolves to the signal value (or rejects with a dev.restate.sdk.common.TerminalException).

Parameters

name

the signal name.

typeTag

the response type tag to use for deserializing the signal result.