Skip to main content

Module lifecycle

Module lifecycle 

Source
Expand description

Service lifecycle runner.

This module contains the shared entrypoint mechanics for Aster services. Product crates still build their HTTP server, application state, background workers, and business hooks, while Forge owns the repeated runtime flow: register components, run startup phases, wait for termination, stop the main service, run product before-shutdown hooks, run component shutdown phases, and return the service output.

Structs§

AsterRuntime
Product-facing runtime runner built from service and component registrations.
AsterRuntimeBuilder
Builder for AsterRuntime.
RuntimeComponentBundleRegistration
Wrapper for components that only register runtime descriptors and hooks.
RuntimeComponentWithShutdown
Component factory that receives the runtime’s shared shutdown token.
RuntimeServiceComponent
Component that provides the main runtime service future.
ServiceLifecycle
Runs one service future with shared Aster shutdown mechanics.
ShutdownResourceComponent
Runtime component for one shutdown-only owned resource.
TryRuntimeComponentWithShutdown
Fallible component factory that receives the runtime’s shared shutdown token.

Enums§

AsterRuntimeError
Error returned when runtime assembly or required startup phases fail.

Traits§

AsterRuntimeComponent
Runtime component adapter used by AsterRuntimeBuilder::component.

Functions§

runtime_component
Adapts a RuntimeComponentBundle for AsterRuntimeBuilder::component.
runtime_component_with_shutdown
Builds one runtime component from the runtime’s shared shutdown token.
shutdown_resource_component
Creates a shutdown-only resource component registration.
shutdown_resource_component_after
Creates a shutdown-only resource component registration with dependencies.
try_runtime_component_with_shutdown
Fallible variant of runtime_component_with_shutdown.