HostingModule

PackageAxial.Hosting
Microsoft Generic Host registration helpers for root Flow applications.

Summary

NameSignatureSynopsis
Operations
watchdogWithHeartbeatHosting.watchdogWithHeartbeat heartbeatGate variables processId notifier isHealthyRuns a scheduler heartbeat gated by an optional application health flow.
watchdogWithHosting.watchdogWith variables processId notifier isHealthyRuns the scheduler heartbeat with an application-owned progress check; use this to detect stalled work.
watchdogHosting.watchdog variables processId notifierDetects a wedged Axial scheduler or starved thread pool; supply watchdogWith isHealthy to tie the watchdog to your application's progress.
addAppHosting.addApp environmentFactory describeError application servicesRegisters a root application that owns the Generic Host lifetime.
addAppWithHosting.addAppWith options environmentFactory describeError application servicesRegisters a root application with explicit Generic Host completion options.

Operations

kind:member

watchdogWithHeartbeat

Hosting.watchdogWithHeartbeat heartbeatGate variables processId notifier isHealthy
Member
Runs a scheduler heartbeat gated by an optional application health flow. Requires a clock and logger in the environment.

Parameters

NameTypeDescription
heartbeatGateFlow<'env, Never, unit>
variablesIEnvironmentVariables
processIdint
notifierISystemdNotifier
isHealthyFlow<'env, Never, bool>

Returns

Flow<'env, Never, unit>
kind:member

watchdogWith

Hosting.watchdogWith variables processId notifier isHealthy
Member
Runs the scheduler heartbeat with an application-owned progress check; use this to detect stalled work.

Parameters

NameTypeDescription
variablesIEnvironmentVariables
processIdint
notifierISystemdNotifier
isHealthyFlow<'env, Never, bool>

Returns

Flow<'env, Never, unit>
kind:member

watchdog

Hosting.watchdog variables processId notifier
Member
Detects a wedged Axial scheduler or starved thread pool; supply watchdogWith isHealthy to tie the watchdog to your application's progress.

Parameters

NameTypeDescription
variablesIEnvironmentVariables
processIdint
notifierISystemdNotifier

Returns

Flow<'env, Never, unit>
kind:member

addApp

Hosting.addApp environmentFactory describeError application services
Member
Registers a root application that owns the Generic Host lifetime.

Parameters

NameTypeDescription
environmentFactoryIServiceProvider -> 'env
describeError'error -> string
applicationFlow<'env, 'error, unit>
servicesIServiceCollection

Returns

IServiceCollection
kind:member

addAppWith

Hosting.addAppWith options environmentFactory describeError application services
Member
Registers a root application with explicit Generic Host completion options.

Parameters

NameTypeDescription
optionsHostedAppOptions
environmentFactoryIServiceProvider -> 'env
describeError'error -> string
applicationFlow<'env, 'error, unit>
servicesIServiceCollection

Returns

IServiceCollection