UNPKG

arvo-xstate

Version:

This package allows you to use xstate Actors and State Machines to act as orchestrators in an Arvo Event Driven System

15 lines (14 loc) 638 B
import type { ArvoEventHandlerOpenTelemetryOptions } from 'arvo-event-handler'; import type { ExecuteMachineInput, ExecuteMachineOutput } from './types'; /** * Interface defining a machine execution engine. */ export interface IMachineExectionEngine { /** * Executes a state machine and processes events. * @param param - Input parameters for machine execution * @param opentelemetry - Telemetry configuration options * @returns Machine execution results including state and events */ execute: (param: ExecuteMachineInput, opentelemetry: ArvoEventHandlerOpenTelemetryOptions) => ExecuteMachineOutput; }