fixed comments

This commit is contained in:
2025-10-01 12:11:34 +02:00
parent 8c49a63a50
commit f78e48900a
11 changed files with 146 additions and 144 deletions

View File

@@ -1,17 +1,17 @@
//! # API Module
//!
//! This module provides all HTTP communication between WatcherAgent and the backend server.
//!
//! ## Responsibilities
//! - **Registration:** Registers the agent with the backend and retrieves its server ID and IP address.
//! - **Heartbeat:** Periodically sends heartbeat signals to indicate liveness.
//! - **Metrics Reporting:** Sends collected hardware and network metrics to the backend.
//! - **Command Listening:** Polls for and executes remote commands from the backend (e.g., update image, restart container).
//!
//! ## Usage
//! These functions are called from the main agent loop and background tasks. All network operations are asynchronous and robust to transient failures.
/// # API Module
///
/// This module provides all HTTP communication between WatcherAgent and the backend server.
///
/// ## Responsibilities
/// - **Registration:** Registers the agent with the backend and retrieves its server ID and IP address.
/// - **Heartbeat:** Periodically sends heartbeat signals to indicate liveness.
/// - **Metrics Reporting:** Sends collected hardware and network metrics to the backend.
/// - **Command Listening:** Polls for and executes remote commands from the backend (e.g., update image, restart container).
///
/// ## Usage
/// These functions are called from the main agent loop and background tasks. All network operations are asynchronous and robust to transient failures.
use std::time::Duration;
use crate::hardware::HardwareInfo;