What is asyncmachine-go?
main/pkg/machine is a nondeterministic, multi-state, clock-based, relational, optionally accepting, and non-blocking state machine. It functions as a rules engine designed to orchestrate blocking APIs into controllable asynchronous state machines.
Key operational concepts:
- State Mutations: Write operations.
- State Checking: Read operations (checking active states).
- State Waiting: Subscriptions to state changes.
Unlike a standard Finite State Machine (FSM) that transitions linearly (e.g., A -> B -> C), asyncmachine can transition between sets of states (e.g., AB -> BC), executing a complex lifecycle of handlers including Enter, Exit, State, and End for negotiation and consensus.