rskit-bootstrap 0.1.0-alpha.2

Application lifecycle orchestration: typestate App, Component registry, hooks
Documentation

rskit-bootstrap — Service Lifecycle

Typestate App<S,C> builder, Component trait, ordered Registry, and Health reporting.

CI crates.io docs.rs License: MIT MSRV: 1.91

Features

  • Compile-time lifecycle ordering via typestate pattern
  • Reverse-order graceful shutdown
  • Cancellation via tokio_util::sync::CancellationToken
  • HealthStatus with three states: Healthy, Degraded, Unhealthy
  • Component trait for pluggable lifecycle-managed services

Usage

[dependencies]
rskit-bootstrap = "0.1.0-alpha.1"
use rskit_bootstrap::{AppBuilder, Component, Health};

AppBuilder::new(my_config)
    .build()?
    .before_start(|_cancel| async move {
        tracing::info!("starting");
        Ok(())
    })
    .run()
    .await?;

See Also

Main repository README