AppModule
PackageAxial
Starts and controls root Flow applications without requiring an external hosting framework.
Summary
| Name | Signature | Synopsis |
|---|---|---|
| start | App.start environment application | Starts a root workflow and returns a handle that owns its lifetime. |
| startWithCancellation | App.startWithCancellation cancellationToken environment application | Starts a root workflow linked to an external cancellation token. |
| run | App.run environment application | Runs a root workflow to completion using the caller's asynchronous cancellation token. |
| runWithCancellation | App.runWithCancellation cancellationToken environment application | Runs a root workflow to completion using an explicit host-owned cancellation token. |
Starts a root workflow and returns a handle that owns its lifetime.
Parameters
| Name | Type | Description |
|---|---|---|
| environment | 'env | The explicit environment supplied to the root workflow. |
| application | Flow<'env, 'error, 'value> | The root workflow to start. |
Returns
AppHandle<'error, 'value>
Starts a root workflow linked to an external cancellation token.
Parameters
| Name | Type | Description |
|---|---|---|
| cancellationToken | CancellationToken | A host-owned token that requests application stop when cancelled. |
| environment | 'env | The explicit environment supplied to the root workflow. |
| application | Flow<'env, 'error, 'value> | The root workflow to start. |
Returns
AppHandle<'error, 'value>
Runs a root workflow to completion using the caller's asynchronous cancellation token.
Parameters
| Name | Type | Description |
|---|---|---|
| environment | 'env | The explicit environment supplied to the root workflow. |
| application | Flow<'env, 'error, 'value> | The root workflow to run. |
Returns
Async<Exit<'value, 'error>>
Runs a root workflow to completion using an explicit host-owned cancellation token.
Parameters
| Name | Type | Description |
|---|---|---|
| cancellationToken | CancellationToken | A host-owned token that requests application stop when cancelled. |
| environment | 'env | The explicit environment supplied to the root workflow. |
| application | Flow<'env, 'error, 'value> | The root workflow to run. |
Returns
Async<Exit<'value, 'error>>

