pub struct AdminService { /* private fields */ }Expand description
Admin API service for dashboard operations with real system metrics.
Implementations§
Source§impl AdminService
impl AdminService
Sourcepub fn with_config(
node_id: &str,
node_name: Option<String>,
bind_address: &str,
cluster_name: &str,
peers: Vec<String>,
) -> Self
pub fn with_config( node_id: &str, node_name: Option<String>, bind_address: &str, cluster_name: &str, peers: Vec<String>, ) -> Self
Create admin service with custom node config.
Sourcepub fn peer_addresses(&self) -> Vec<String>
pub fn peer_addresses(&self) -> Vec<String>
Get configured peer addresses.
Sourcepub fn add_peer_address(&self, address: String)
pub fn add_peer_address(&self, address: String)
Add a peer address.
Sourcepub fn register_peer(&self, peer: PeerNode)
pub fn register_peer(&self, peer: PeerNode)
Register or update a peer node.
Sourcepub fn remove_peer(&self, node_id: &str)
pub fn remove_peer(&self, node_id: &str)
Remove a peer node.
Sourcepub fn mark_peer_offline(&self, node_id: &str)
pub fn mark_peer_offline(&self, node_id: &str)
Mark a peer as offline.
Sourcepub fn get_self_info(&self) -> PeerNode
pub fn get_self_info(&self) -> PeerNode
Get node info for this node (for peer registration).
Sourcepub fn record_query(&self, duration_ms: f64, success: bool)
pub fn record_query(&self, duration_ms: f64, success: bool)
Record a query execution for statistics.
Sourcepub fn record_network(&self, bytes_in: u64, bytes_out: u64)
pub fn record_network(&self, bytes_in: u64, bytes_out: u64)
Record network bytes.
Sourcepub fn connection_opened(&self)
pub fn connection_opened(&self)
Increment active connections.
Sourcepub fn connection_closed(&self)
pub fn connection_closed(&self)
Decrement active connections.
Sourcepub fn get_cluster_info(&self) -> ClusterInfo
pub fn get_cluster_info(&self) -> ClusterInfo
Get cluster information.
Sourcepub fn get_dashboard_summary(&self) -> DashboardSummary
pub fn get_dashboard_summary(&self) -> DashboardSummary
Get dashboard summary with real metrics.
Sourcepub fn get_storage_info(&self) -> StorageInfo
pub fn get_storage_info(&self) -> StorageInfo
Get storage information with real disk metrics.
Sourcepub fn get_query_stats(&self) -> QueryStats
pub fn get_query_stats(&self) -> QueryStats
Get query statistics with real data.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for AdminService
impl RefUnwindSafe for AdminService
impl Send for AdminService
impl Sync for AdminService
impl Unpin for AdminService
impl UnsafeUnpin for AdminService
impl UnwindSafe for AdminService
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more