Table of Contents

Interface IAsyncProcess<TState, TInput, TOutput>

Namespace
Virtufin.Core.Behavior
Assembly
Virtufin.Core.dll

An IProcess<TState, TInput, TOutput> whose step may await: the shape a behavior is lifted to before it is bound to an event stream, so a synchronous process and an asynchronous one (e.g. an executor calling a venue) run through one pipeline. The worker devkits bind it to CloudEvents.

public interface IAsyncProcess<TState, TInput, TOutput>

Type Parameters

TState

The process's internal state.

TInput

The input observation.

TOutput

The output emitted at this step.

Properties

Initial

The initial state.

TState Initial { get; }

Property Value

TState

Methods

StepAsync(TState, TInput)

Step the process forward by one input observation.

ValueTask<(TState NextState, TOutput Output)> StepAsync(TState state, TInput input)

Parameters

state TState

Current state.

input TInput

Observation to apply.

Returns

ValueTask<(TState NextState, TOutput Output)>

Tuple of (next state, output emitted).