pub struct AdminState {Show 17 fields
    pub http_server_addr: Option<SocketAddr>,
    pub ws_server_addr: Option<SocketAddr>,
    pub grpc_server_addr: Option<SocketAddr>,
    pub graphql_server_addr: Option<SocketAddr>,
    pub api_enabled: bool,
    pub admin_port: u16,
    pub start_time: DateTime<Utc>,
    pub metrics: Arc<RwLock<RequestMetrics>>,
    pub system_metrics: Arc<RwLock<SystemMetrics>>,
    pub config: Arc<RwLock<ConfigurationState>>,
    pub logs: Arc<RwLock<Vec<RequestLog>>>,
    pub time_series: Arc<RwLock<TimeSeriesData>>,
    pub restart_status: Arc<RwLock<RestartStatus>>,
    pub smoke_test_results: Arc<RwLock<Vec<SmokeTestResult>>>,
    pub import_history: Arc<RwLock<Vec<ImportHistoryEntry>>>,
    pub workspace_persistence: Arc<WorkspacePersistence>,
    pub plugin_registry: Arc<RwLock<PluginRegistry>>,
}Expand description
Shared state for the admin UI
Fields§
§http_server_addr: Option<SocketAddr>HTTP server address
ws_server_addr: Option<SocketAddr>WebSocket server address
grpc_server_addr: Option<SocketAddr>gRPC server address
graphql_server_addr: Option<SocketAddr>GraphQL server address
api_enabled: boolWhether API endpoints are enabled
admin_port: u16Admin server port
start_time: DateTime<Utc>Start time
metrics: Arc<RwLock<RequestMetrics>>Request metrics (protected by RwLock)
system_metrics: Arc<RwLock<SystemMetrics>>System metrics (protected by RwLock)
config: Arc<RwLock<ConfigurationState>>Configuration (protected by RwLock)
logs: Arc<RwLock<Vec<RequestLog>>>Request logs (protected by RwLock)
time_series: Arc<RwLock<TimeSeriesData>>Time series data (protected by RwLock)
restart_status: Arc<RwLock<RestartStatus>>Restart status (protected by RwLock)
smoke_test_results: Arc<RwLock<Vec<SmokeTestResult>>>Smoke test results (protected by RwLock)
import_history: Arc<RwLock<Vec<ImportHistoryEntry>>>Import history (protected by RwLock)
workspace_persistence: Arc<WorkspacePersistence>Workspace persistence
plugin_registry: Arc<RwLock<PluginRegistry>>Plugin registry (protected by RwLock)
Implementations§
Source§impl AdminState
 
impl AdminState
Sourcepub async fn start_system_monitoring(&self)
 
pub async fn start_system_monitoring(&self)
Start system monitoring background task
Sourcepub fn new(
    http_server_addr: Option<SocketAddr>,
    ws_server_addr: Option<SocketAddr>,
    grpc_server_addr: Option<SocketAddr>,
    graphql_server_addr: Option<SocketAddr>,
    api_enabled: bool,
    admin_port: u16,
) -> Self
 
pub fn new( http_server_addr: Option<SocketAddr>, ws_server_addr: Option<SocketAddr>, grpc_server_addr: Option<SocketAddr>, graphql_server_addr: Option<SocketAddr>, api_enabled: bool, admin_port: u16, ) -> Self
Create new admin state
Sourcepub async fn record_request(
    &self,
    method: &str,
    path: &str,
    status_code: u16,
    response_time_ms: u64,
    error: Option<String>,
)
 
pub async fn record_request( &self, method: &str, path: &str, status_code: u16, response_time_ms: u64, error: Option<String>, )
Record a request
Sourcepub async fn get_metrics(&self) -> RequestMetrics
 
pub async fn get_metrics(&self) -> RequestMetrics
Get current metrics
Sourcepub async fn update_system_metrics(
    &self,
    memory_mb: u64,
    cpu_percent: f64,
    threads: u32,
)
 
pub async fn update_system_metrics( &self, memory_mb: u64, cpu_percent: f64, threads: u32, )
Update system metrics
Sourcepub async fn get_system_metrics(&self) -> SystemMetrics
 
pub async fn get_system_metrics(&self) -> SystemMetrics
Get system metrics
Sourcepub async fn get_time_series_data(&self) -> TimeSeriesData
 
pub async fn get_time_series_data(&self) -> TimeSeriesData
Get time series data
Sourcepub async fn get_restart_status(&self) -> RestartStatus
 
pub async fn get_restart_status(&self) -> RestartStatus
Get restart status
Sourcepub async fn initiate_restart(&self, reason: String) -> Result<()>
 
pub async fn initiate_restart(&self, reason: String) -> Result<()>
Initiate server restart
Sourcepub async fn complete_restart(&self, success: bool)
 
pub async fn complete_restart(&self, success: bool)
Complete restart (success or failure)
Sourcepub async fn get_smoke_test_results(&self) -> Vec<SmokeTestResult>
 
pub async fn get_smoke_test_results(&self) -> Vec<SmokeTestResult>
Get smoke test results
Sourcepub async fn update_smoke_test_result(&self, result: SmokeTestResult)
 
pub async fn update_smoke_test_result(&self, result: SmokeTestResult)
Update smoke test result
Sourcepub async fn clear_smoke_test_results(&self)
 
pub async fn clear_smoke_test_results(&self)
Clear all smoke test results
Sourcepub async fn get_config(&self) -> ConfigurationState
 
pub async fn get_config(&self) -> ConfigurationState
Get current configuration
Sourcepub async fn update_latency_config(
    &self,
    base_ms: u64,
    jitter_ms: u64,
    tag_overrides: HashMap<String, u64>,
)
 
pub async fn update_latency_config( &self, base_ms: u64, jitter_ms: u64, tag_overrides: HashMap<String, u64>, )
Update latency configuration
Sourcepub async fn update_fault_config(
    &self,
    enabled: bool,
    failure_rate: f64,
    status_codes: Vec<u16>,
)
 
pub async fn update_fault_config( &self, enabled: bool, failure_rate: f64, status_codes: Vec<u16>, )
Update fault configuration
Sourcepub async fn update_proxy_config(
    &self,
    enabled: bool,
    upstream_url: Option<String>,
    timeout_seconds: u64,
)
 
pub async fn update_proxy_config( &self, enabled: bool, upstream_url: Option<String>, timeout_seconds: u64, )
Update proxy configuration
Sourcepub async fn update_validation_config(
    &self,
    mode: String,
    aggregate_errors: bool,
    validate_responses: bool,
    overrides: HashMap<String, String>,
)
 
pub async fn update_validation_config( &self, mode: String, aggregate_errors: bool, validate_responses: bool, overrides: HashMap<String, String>, )
Update validation settings
Sourcepub async fn get_logs_filtered(&self, filter: &LogFilter) -> Vec<RequestLog>
 
pub async fn get_logs_filtered(&self, filter: &LogFilter) -> Vec<RequestLog>
Get filtered logs
Sourcepub async fn clear_logs(&self)
 
pub async fn clear_logs(&self)
Clear all logs
Trait Implementations§
Source§impl Clone for AdminState
 
impl Clone for AdminState
Source§fn clone(&self) -> AdminState
 
fn clone(&self) -> AdminState
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
 
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for AdminState
impl !RefUnwindSafe for AdminState
impl Send for AdminState
impl Sync for AdminState
impl Unpin for AdminState
impl !UnwindSafe for AdminState
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
    T: 'a,
 
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
    T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
    T: 'a,
 
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
    T: 'a,
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
Source§impl<T> CloneToUninit for Twhere
    T: Clone,
 
impl<T> CloneToUninit for Twhere
    T: Clone,
Source§impl<T> FutureExt for T
 
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
 
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
 
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> GetSetFdFlags for T
 
impl<T> GetSetFdFlags for T
Source§fn get_fd_flags(&self) -> Result<FdFlags, Error>where
    T: AsFilelike,
 
fn get_fd_flags(&self) -> Result<FdFlags, Error>where
    T: AsFilelike,
self file descriptor.Source§fn new_set_fd_flags(&self, fd_flags: FdFlags) -> Result<SetFdFlags<T>, Error>where
    T: AsFilelike,
 
fn new_set_fd_flags(&self, fd_flags: FdFlags) -> Result<SetFdFlags<T>, Error>where
    T: AsFilelike,
Source§fn set_fd_flags(&mut self, set_fd_flags: SetFdFlags<T>) -> Result<(), Error>where
    T: AsFilelike,
 
fn set_fd_flags(&mut self, set_fd_flags: SetFdFlags<T>) -> Result<(), Error>where
    T: AsFilelike,
self file descriptor. Read moreSource§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>
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>
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 moreSource§impl<T> IntoRequest<T> for T
 
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
 
fn into_request(self) -> Request<T>
T in a tonic::Request