systemprompt-mcp 0.14.5

Native Model Context Protocol (MCP) implementation for systemprompt.io. Orchestration, per-server OAuth2, RBAC middleware, and tool-call governance — the core of the AI governance pipeline.
//! Health and status monitoring for running MCP servers.
//!
//! Health probes, proxy reachability checks, and aggregated per-service
//! status snapshots.

pub mod health;
pub mod proxy_health;
pub mod status;

use crate::McpServerConfig;
use crate::error::McpDomainResult;
use std::collections::HashMap;

#[derive(Debug, Clone, Copy, Default)]
pub struct MonitoringService;

impl MonitoringService {
    pub const fn new() -> Self {
        Self
    }

    pub async fn check_health(
        &self,
        config: &McpServerConfig,
    ) -> McpDomainResult<health::HealthStatus> {
        health::check_service_health(config).await
    }

    pub async fn get_status_for_all(
        &self,
        servers: &[McpServerConfig],
    ) -> McpDomainResult<HashMap<String, status::ServiceStatus>> {
        status::get_all_service_status(servers).await
    }

    pub fn display_status(
        servers: &[McpServerConfig],
        status_data: &HashMap<String, status::ServiceStatus>,
    ) {
        status::display_service_status(servers, status_data);
    }
}