Struct InvocationHandle
- Namespace
- Restate.Sdk
- Assembly
- Restate.Sdk.dll
A handle to a running invocation, returned by send operations. Carries the invocation id, and addresses signals on that invocation.
public readonly record struct InvocationHandle : IEquatable<InvocationHandle>
- Implements
- Inherited Members
Constructors
InvocationHandle(string)
A handle to a running invocation, returned by send operations. Carries the invocation id, and addresses signals on that invocation.
public InvocationHandle(string InvocationId)
Parameters
InvocationIdstring
Properties
InvocationId
public string InvocationId { get; init; }
Property Value
Methods
RejectSignal(Context, string, string)
Rejects a named signal on this invocation: the handler awaiting it fails with a
TerminalException carrying reason.
public ValueTask RejectSignal(Context context, string name, string reason)
Parameters
contextContextThe context of the handler sending the signal.
namestringThe signal name the target handler awaits.
reasonstringThe rejection reason the awaiting handler sees.
Returns
RejectSignal(IContext, int, string)
Rejects an unnamed signal on this invocation, addressed by the index the awaiting handler allocated — Index.
public ValueTask RejectSignal(IContext context, int signalIndex, string reason)
Parameters
contextIContextThe context of the handler sending the signal.
signalIndexintThe signal index the target handler awaits.
reasonstringThe rejection reason the awaiting handler sees.
Returns
RejectSignal(IContext, string, string)
Rejects a named signal on this invocation through any IContext: the
handler awaiting it fails with a TerminalException carrying
reason.
public ValueTask RejectSignal(IContext context, string name, string reason)
Parameters
contextIContextThe context of the handler sending the signal.
namestringThe signal name the target handler awaits.
reasonstringThe rejection reason the awaiting handler sees.
Returns
ResolveSignal<T>(Context, string, T)
Resolves a named signal on this invocation with a value. The handler being signalled receives it from its Signal<T>(string) future, whether it is already awaiting the signal or reaches it later.
public ValueTask ResolveSignal<T>(Context context, string name, T value)
Parameters
contextContextThe context of the handler sending the signal.
namestringThe signal name the target handler awaits.
valueTThe value the signal resolves with.
Returns
Type Parameters
T
ResolveSignal<T>(IContext, int, T)
Resolves an unnamed signal on this invocation with a value, addressed by the index the awaiting handler allocated — Index.
public ValueTask ResolveSignal<T>(IContext context, int signalIndex, T value)
Parameters
contextIContextThe context of the handler sending the signal.
signalIndexintThe signal index the target handler awaits.
valueTThe value the signal resolves with.
Returns
Type Parameters
T
ResolveSignal<T>(IContext, string, T)
Resolves a named signal on this invocation with a value, through any IContext — so a helper written against the interface can signal an invocation without taking a dependency on Context.
public ValueTask ResolveSignal<T>(IContext context, string name, T value)
Parameters
contextIContextThe context of the handler sending the signal.
namestringThe signal name the target handler awaits.
valueTThe value the signal resolves with.
Returns
Type Parameters
T