Skip to main content

admin_router

Function admin_router 

Source
pub fn admin_router(
    pool: Pool<Sqlite>,
    writer: WriterHandle,
    auth: Arc<AuthContext>,
    config: AdminConfig,
    strike_policy: StrikePolicy,
) -> Router
Expand description

Build a Router exposing the tools.cairn.admin.* endpoints registered so far. Compose with subscribe/query/createReport routers via Router::merge.

strike_policy is the resolved v1.4 [strike_policy] (#48); the strikes read endpoint consults the threshold + decay window when projecting the wire envelope. Pass the same instance the writer task holds — serve::run resolves once at startup and clones here.