Skip to main content

Module AirClient

Module AirClient 

Source
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:

§Client core

Modules§

AirMetrics
Metrics from the Air daemon.
AirStatus
Status of the Air daemon.
ApplyUpdate
AirClient::ApplyUpdate - applies a previously-downloaded update package via the Air daemon’s UpdateService.
Authenticate
AirClient::authenticate - authenticates a user against the Air daemon’s AuthenticationService and returns a session token on success.
CheckForUpdates
AirClient::CheckForUpdates - queries the Air daemon’s UpdateService for available updates on the given channel.
DownloadFile
AirClient::DownloadFile - downloads a single file via the Air daemon’s DownloaderService and writes it to a local filesystem path.
DownloadStream
Wrapper for an asynchronous Air download stream.
DownloadStreamChunk
Single chunk of data from a streaming download. Carries the binary payload plus progress + completion metadata.
DownloadStreamRpc
AirClient::DownloadStream - initiates a streaming download from the Air daemon’s DownloaderService and returns a DownloadStream::Struct that yields chunks via .next().await.
DownloadUpdate
AirClient::DownloadUpdate - downloads an update package to disk via the Air daemon’s DownloaderService. Uses the same DownloadRequest wire shape as AirClient::DownloadFile but routes via the download_update RPC so server-side metrics can attribute the bandwidth to update operations.
ExtendedFileInfo
Extended file information.
FileInfo
Information about a downloaded file.
FileResult
Result of a file search.
GetConfiguration
AirClient::GetConfiguration - reads back the daemon’s current configuration for a named section.
GetFileInfo
AirClient::GetFileInfo - fetches extended metadata for a single filesystem path from the Air daemon. Returns size, MIME type, SHA-256 checksum, modification time, and an exists flag (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 a HashMap<String, String> so the daemon can ship arbitrary keys; this method extracts the canonical numeric fields (AirMetrics::Struct) by name and parses each as f64, defaulting to 0.0 on missing / unparseable entries.
GetResourceUsage
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 than AirClient::HealthCheck returns.
HealthCheck
AirClient::HealthCheck - pings the Air daemon and returns whether it reports itself healthy. Lightweight liveness probe; for runtime detail use AirClient::GetStatus.
IndexFiles
AirClient::IndexFiles - drives the Air daemon’s IndexingService over a directory tree. Filters by include / exclude glob patterns and bounds recursion depth so a stray request can’t walk the entire filesystem.
IndexInfo
Information about file indexing.
ResourceUsage
Resource usage information from the Air daemon.
SearchFiles
AirClient::SearchFiles - issues a content / path search against the Air daemon’s IndexingService index.
SetResourceLimits
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.
UpdateConfiguration
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.
UpdateInfo
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§

IntoRequestExt
Helper trait for converting any value into a tonic::Request<T>.