Expand description
HTTP client for the aranet-service REST API.
This module provides a client for interacting with the aranet-service background service. It allows checking service status, controlling the collector, and managing monitored devices.
§Example
use aranet_core::service_client::ServiceClient;
let client = ServiceClient::new("http://localhost:8080")?;
// Check if service is running
let status = client.status().await?;
println!("Collector running: {}", status.collector.running);
// Start the collector
client.start_collector().await?;
Ok(())Structs§
- Collector
Action Response - Response from collector control actions.
- Collector
Status - Collector status.
- Device
Collection Stats - Collection statistics for a single device.
- Device
Config - Device configuration for monitoring.
- Health
Response - Health check response.
- Server
Config - Server configuration.
- Service
Client - HTTP client for the aranet-service API.
- Service
Config - Service configuration.
- Service
Status - Service status response.
Enums§
- Service
Client Error - Error type for service client operations.
Type Aliases§
- Result
- Result type for service client operations.