Expand description
§Air::Client::AirClient
gRPC client wrapper for the Air daemon service. Callers reach Air through this façade for update management, authentication, file indexing, and system monitoring.
§Layout
Per-message DTOs live one-per-file under this module; each declares a
single pub struct Struct to match the file name:
AirMetrics- daemon resource snapshotAirStatus- daemon uptime / request totalsDownloadStreamChunk- one streaming download frameExtendedFileInfo- file metadata for index queriesFileInfo- downloaded-file metadataFileResult- file-search hitIndexInfo- indexing-progress snapshotResourceUsage- process resource countsUpdateInfo- available-update metadataDownloadStream- wrapstonic::Streamingto yieldDownloadStreamChunk::Structitems via.next().await.
§Client core
AirClientstruct - thread-safe gRPC client overArc<Mutex<…>>AirClient::new- async connect with parsed tonicEndpointAirClient::is_connected/AirClient::addressaccessorsDebugimplIntoRequestExt- blanket helper to wrap any value astonic::Request<T>with one method callDEFAULT_AIR_SERVER_ADDRESSconstant ("[::1]:50053")
Modules§
- AirMetrics
- Metrics from the Air daemon.
- AirStatus
- Status of the Air daemon.
- Apply
Update AirClient::ApplyUpdate- applies a previously-downloaded update package via the Air daemon’sUpdateService.- Authenticate
AirClient::authenticate- authenticates a user against the Air daemon’sAuthenticationServiceand returns a session token on success.- Check
ForUpdates AirClient::CheckForUpdates- queries the Air daemon’sUpdateServicefor available updates on the given channel.- Download
File AirClient::DownloadFile- downloads a single file via the Air daemon’sDownloaderServiceand writes it to a local filesystem path.- Download
Stream - Wrapper for an asynchronous Air download stream.
- Download
Stream Chunk - Single chunk of data from a streaming download. Carries the binary payload plus progress + completion metadata.
- Download
Stream Rpc AirClient::DownloadStream- initiates a streaming download from the Air daemon’sDownloaderServiceand returns aDownloadStream::Structthat yields chunks via.next().await.- Download
Update AirClient::DownloadUpdate- downloads an update package to disk via the Air daemon’sDownloaderService. Uses the sameDownloadRequestwire shape asAirClient::DownloadFilebut routes via thedownload_updateRPC so server-side metrics can attribute the bandwidth to update operations.- Extended
File Info - Extended file information.
- File
Info - Information about a downloaded file.
- File
Result - Result of a file search.
- GetConfiguration
AirClient::GetConfiguration- reads back the daemon’s current configuration for a named section.- GetFile
Info AirClient::GetFileInfo- fetches extended metadata for a single filesystem path from the Air daemon. Returns size, MIME type, SHA-256 checksum, modification time, and anexistsflag (false when the path is missing on the daemon side).- GetMetrics
AirClient::GetMetrics- fetches a metrics snapshot from the Air daemon. The wire response is aHashMap<String, String>so the daemon can ship arbitrary keys; this method extracts the canonical numeric fields (AirMetrics::Struct) by name and parses each asf64, defaulting to0.0on missing / unparseable entries.- GetResource
Usage AirClient::GetResourceUsage- fetches a structured resource snapshot from the Air daemon (memory, CPU, disk, network).- GetStatus
AirClient::GetStatus- fetches a wide snapshot of the Air daemon’s runtime status: version string, uptime, request counters, response-time average, memory + CPU usage, in-flight request count. Intended for status dashboards / health checks that need richer detail thanAirClient::HealthCheckreturns.- Health
Check AirClient::HealthCheck- pings the Air daemon and returns whether it reports itself healthy. Lightweight liveness probe; for runtime detail useAirClient::GetStatus.- Index
Files AirClient::IndexFiles- drives the Air daemon’sIndexingServiceover a directory tree. Filters by include / exclude glob patterns and bounds recursion depth so a stray request can’t walk the entire filesystem.- Index
Info - Information about file indexing.
- Resource
Usage - Resource usage information from the Air daemon.
- Search
Files AirClient::SearchFiles- issues a content / path search against the Air daemon’sIndexingServiceindex.- SetResource
Limits AirClient::SetResourceLimits- asks the Air daemon to enforce ceilings on its own resource usage. Daemon-side enforcement is advisory; OS-level cgroups still bound the process.- Update
Configuration AirClient::UpdateConfiguration- applies a partial configuration patch to the named section. Sends only the keys the caller wants to change; the daemon merges over the existing section.- Update
Info - Information about an available update.
Structs§
- AirClient
- Air gRPC client wrapper.
Constants§
- DEFAULT_
AIR_ SERVER_ ADDRESS - Default gRPC server address for the Air daemon.
Traits§
- Into
Request Ext - Helper trait for converting any value into a
tonic::Request<T>.