Skip to main content

Module app

Module app 

Source
Expand description

Application startup and service wiring.

Provides StartupOptions for startup flags and tuning knobs, and GenericStartup which initializes tracing, environment, routing, documentation, cache, and gateway registration, then mounts controllers, jobs, and queue consumers. Use GenericStartup::bootstrap for full startup, or GenericStartup::new plus GenericStartup::init for manual wiring.

let startup = GenericStartup::bootstrap(
    StartupOptions::default().with_http(true),
    vec!["/api".to_string()],
    None,
    Some(controller_registrar),
    None,
).await?;
startup.serve().await?;

Modules§

queue_descriptor
Queue consumer descriptors recorded by ConsumerRegistrar.

Structs§

GenericStartup
Assembled service state produced by GenericStartup::bootstrap or manual init.
StartupOptions
Startup flags and tuning knobs for GenericStartup.

Traits§

ConsumerRegistrar
Builds the queue consumers to record during bootstrap.
ControllerRegistrar
Builds the HTTP controllers to mount during bootstrap.
StaticRegistrar
Mounts static assets onto the router during bootstrap.