Skip to main content

Module health

Module health 

Source
Expand description

Health checks for modules and services Copyright © 2025-2026 Wenze Wei. All Rights Reserved.

This file is part of Ri. The Ri project belongs to the Dunimd Team.

Licensed under the Apache License, Version 2.0 (the “License”); You may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

§Health Check System

This module provides comprehensive health checking functionality for Ri modules and services. It supports both active health checks (proactive monitoring) and passive health indicators (reactive status reporting).

§Key Components

  • HealthStatus: Enum representing the health state of a component
  • HealthCheck: Trait for implementing custom health checks
  • HealthChecker: Service for managing and executing health checks
  • HealthReport: Comprehensive health status report

§Design Principles

  1. Non-Intrusive: Health checks can be added without modifying existing code
  2. Configurable: Check intervals, timeouts, and thresholds are configurable
  3. Comprehensive: Supports multiple health indicators and aggregation
  4. Performance-Aware: Minimal impact on system performance
  5. Extensible: Easy to add new health check types

Structs§

RiHealthCheckConfig
Configuration for health checks.
RiHealthCheckResult
Result of a health check execution.
RiHealthChecker
Health checker service that manages and executes health checks.
RiHealthReport
Comprehensive health report containing status of all components.

Enums§

RiHealthStatus
Health status enumeration representing the state of a component or service.

Traits§

HealthCheck
Trait for implementing custom health checks.