StateMachine¶
Canonical path: o6.pubsub.StateMachine
StateMachine
¶
Bases: Protocol
Callable implementing the transition of one PubSub component.
Functions¶
__call__
¶
Move the component from one state to another.
Called synchronously on the server's event loop, so it must not block.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
current
|
PubSubState
|
The component's current |
required |
target
|
PubSubState
|
The |
required |
Returns:
| Type | Description |
|---|---|
StatusCode
|
The StatusCode of the transition and the state actually reached. A bad |
PubSubState
|
status, an exception, a recursive transition, or a malformed result |
tuple[StatusCode, PubSubState]
|
moves the component to |