pub struct AdminSubsystem { /* private fields */ }Expand description
Admin server subsystem.
Manages an Axum-based admin HTTP server with support for:
- Graceful startup and shutdown
- Health monitoring
- Integration with shared tokio runtime
Implementations§
Source§impl AdminSubsystem
impl AdminSubsystem
Sourcepub fn new(bind_addr: String, state: AdminState, handle: Handle) -> Self
pub fn new(bind_addr: String, state: AdminState, handle: Handle) -> Self
Create a new admin subsystem.
§Arguments
bind_addr- Address and port to bind to (e.g., “127.0.0.1:9090”)state- Shared application statehandle- Handle to the tokio runtime
Sourcepub fn with_runtime(
bind_addr: String,
state: AdminState,
runtime: Arc<SharedRuntime>,
) -> Self
pub fn with_runtime( bind_addr: String, state: AdminState, runtime: Arc<SharedRuntime>, ) -> Self
Create a new admin subsystem with an owned runtime.
This variant keeps the runtime alive for the lifetime of the subsystem.
§Arguments
bind_addr- Address and port to bind to (e.g., “127.0.0.1:9090”)state- Shared application stateruntime- Shared runtime (will be kept alive)
Sourcepub fn local_addr(&self) -> Option<SocketAddr>
pub fn local_addr(&self) -> Option<SocketAddr>
Get the actual bound address (available after start).
Trait Implementations§
Source§impl HasVersion for AdminSubsystem
impl HasVersion for AdminSubsystem
Source§fn version(&self) -> SystemVersion
fn version(&self) -> SystemVersion
Returns the version information for this component
Source§impl Subsystem for AdminSubsystem
impl Subsystem for AdminSubsystem
Source§fn is_running(&self) -> bool
fn is_running(&self) -> bool
Check if the subsystem is currently running
Source§fn health_status(&self) -> HealthStatus
fn health_status(&self) -> HealthStatus
Get the current health status of the subsystem Read more
Source§fn as_any_mut(&mut self) -> &mut dyn Any
fn as_any_mut(&mut self) -> &mut dyn Any
Get a mutable reference to self as Any for downcasting
Auto Trait Implementations§
impl !Freeze for AdminSubsystem
impl !RefUnwindSafe for AdminSubsystem
impl Send for AdminSubsystem
impl Sync for AdminSubsystem
impl Unpin for AdminSubsystem
impl !UnwindSafe for AdminSubsystem
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more