Expand description
Admin server subsystem for ReifyDB.
This crate provides an Axum-based HTTP server for web-based administration
of ReifyDB. It integrates with the shared tokio runtime and implements the
standard ReifyDB Subsystem trait for lifecycle management.
§Features
- REST API for configuration and metrics
- Authentication support (optional)
- Static file serving for admin UI
- Health check endpoint
- Graceful shutdown support
§Endpoints
GET /health- Health checkPOST /v1/auth/login- LoginPOST /v1/auth/logout- LogoutGET /v1/auth/status- Auth statusGET /v1/config- Get configurationPUT /v1/config- Update configurationPOST /v1/execute- Execute queryGET /v1/metrics- System metricsGET /- Admin UI
§Example
ⓘ
use reifydb_sub_server::SharedRuntime;
use reifydb_sub_server_admin::{AdminConfig, AdminSubsystem, AdminState};
// Create shared runtime
let runtime = SharedRuntime::new(4);
// Create application state
let state = AdminState::new(engine, 1000, Duration::from_secs(30), false, None);
// Create and start admin subsystem
let mut admin = AdminSubsystem::with_runtime(
"127.0.0.1:9090".to_string(),
state,
Arc::new(runtime),
);
admin.start()?;Structs§
- Admin
Config - Configuration for the admin server subsystem.
- Admin
State - Shared application state for admin handlers.
- Admin
Subsystem - Admin server subsystem.
- Admin
Subsystem Factory - Factory for creating admin subsystem instances.
Functions§
- router
- Create the admin router with all endpoints and middleware.