Spawns the admin server as a background task with lifecycle management.
(
pool: PostgresStorePool,
config: AdminConfig,
lifecycle: &ServerLifecycle,
)
| 308 | |
| 309 | /// Spawns the admin server as a background task with lifecycle management. |
| 310 | pub(crate) fn start_admin_server( |
| 311 | pool: PostgresStorePool, |
| 312 | config: AdminConfig, |
| 313 | lifecycle: &ServerLifecycle, |
| 314 | ) { |
| 315 | SnapshotEntry::install_error_stack_hook(); |
| 316 | |
| 317 | let shutdown = lifecycle.shutdown.clone(); |
| 318 | lifecycle.spawn("Admin server", async move { |
| 319 | run_admin_server(pool, config, shutdown).await |
| 320 | }); |
| 321 | } |
| 322 | |
| 323 | /// Standalone `admin-server` subcommand entrypoint. |
| 324 | #[expect( |
no test coverage detected