Interface IRuntime
Namespace: Cephalon.Engine.Runtime
Assembly: Cephalon.Engine.dll
Represents a built Cephalon runtime that can be initialized, started, restarted, stopped, and introspected by a host.
public interface IRuntimeProperties
Section titled “Properties”FailurePolicy
Section titled “ FailurePolicy”Gets the failure policy that governs startup, stop, and restart behavior.
FailurePolicy FailurePolicy { get; }Property Value
Section titled “Property Value”LastFailure
Section titled “ LastFailure”Gets the most recent failure captured by the lifecycle state machine, if any.
RuntimeFailureInfo? LastFailure { get; }Property Value
Section titled “Property Value”Manifest
Section titled “ Manifest”Gets the immutable manifest that was produced when the runtime was built.
RuntimeManifest Manifest { get; }Property Value
Section titled “Property Value”Modules
Section titled “ Modules”Gets the ordered module set that participates in runtime lifecycle execution.
IReadOnlyList<IModule> Modules { get; }Property Value
Section titled “Property Value”IReadOnlyList<IModule>
OperationalStory
Section titled “ OperationalStory”Gets the richer operator-facing runtime story that explains what loaded, started, failed, and why.
RuntimeOperationalStory OperationalStory { get; }Property Value
Section titled “Property Value”RestartCount
Section titled “ RestartCount”Gets the number of successful manual restart attempts completed by the runtime.
int RestartCount { get; }Property Value
Section titled “Property Value”Status
Section titled “ Status”Gets the current lifecycle status of the runtime.
RuntimeStatus Status { get; }Property Value
Section titled “Property Value”StatusSnapshot
Section titled “ StatusSnapshot”Gets the current status as a serializable snapshot.
RuntimeStatusSnapshot StatusSnapshot { get; }Property Value
Section titled “Property Value”Methods
Section titled “Methods”InitializeAsync(IServiceProvider, CancellationToken)
Section titled “ InitializeAsync(IServiceProvider, CancellationToken)”Initializes the runtime and all lifecycle-aware modules.
Task InitializeAsync(IServiceProvider services, CancellationToken cancellationToken = default)Parameters
Section titled “Parameters”services IServiceProvider
The service provider that modules should use during initialization.
cancellationToken CancellationToken
A token that can cancel the initialization operation.
Returns
Section titled “Returns”RestartAsync(IServiceProvider, CancellationToken)
Section titled “ RestartAsync(IServiceProvider, CancellationToken)”Restarts the runtime when the configured failure policy allows it.
Task RestartAsync(IServiceProvider services, CancellationToken cancellationToken = default)Parameters
Section titled “Parameters”services IServiceProvider
The service provider that modules should use during the restart flow.
cancellationToken CancellationToken
A token that can cancel the restart operation.
Returns
Section titled “Returns”StartAsync(IServiceProvider, CancellationToken)
Section titled “ StartAsync(IServiceProvider, CancellationToken)”Starts the runtime and all lifecycle-aware modules.
Task StartAsync(IServiceProvider services, CancellationToken cancellationToken = default)Parameters
Section titled “Parameters”services IServiceProvider
The service provider that modules should use during startup.
cancellationToken CancellationToken
A token that can cancel the start operation.
Returns
Section titled “Returns”Remarks
Section titled “Remarks”If the runtime has not been initialized yet, the implementation may initialize it first.
StopAsync(CancellationToken)
Section titled “ StopAsync(CancellationToken)”Stops the runtime and all started lifecycle-aware modules.
Task StopAsync(CancellationToken cancellationToken = default)Parameters
Section titled “Parameters”cancellationToken CancellationToken
A token that can cancel the stop operation.