Expand description
§Air::Client::AirServiceProvider
High-level façade over crate::Client::AirClient::AirClient. Each
method generates a request id via crate::Utility::GenerateRequestId,
issues the gRPC call, and returns crate::AirError on failure.
Compared with the raw AirClient surface, this layer:
- hides request-id plumbing from callers,
- returns ergonomic shapes (
CheckForUpdatescollapsesupdate_available == falseintoOk(None)), - keeps a shared
Arc<AirClient>so all callers reuse the same gRPC channel.
§Layout
Per-domain methods live one-per-file under this module; each declares
a single impl AirServiceProvider { … } block:
- Authentication:
Authenticate - Updates:
CheckForUpdates,DownloadUpdate,ApplyUpdate - Downloads:
DownloadFile,DownloadStream - Indexing:
IndexFiles,SearchFiles,GetFileInfo - Status / monitoring:
GetStatus,GetMetrics - Resources:
GetResourceUsage,SetResourceLimits - Configuration:
GetConfiguration,UpdateConfiguration
§Threading model
Cheap to clone (Arc ref-count bump). The interior tokio::sync::Mutex
on the underlying AirClient serialises concurrent RPCs on a single
channel.
Modules§
- Apply
Update AirServiceProvider::ApplyUpdate- tell the Air daemon to install a previously downloaded update. Wrapscrate::Client::AirClient::AirClient::ApplyUpdate.- Authenticate
AirServiceProvider::Authenticate- authenticate a user with the Air daemon. Mints a request id, forwards tocrate::Client::AirClient::AirClient::Authenticate, and surfaces the returned session token.- Check
ForUpdates AirServiceProvider::CheckForUpdates- probe the Air daemon for an available update. Wrapscrate::Client::AirClient::AirClient::CheckForUpdatesand collapsesupdate_available == falseintoOk(None)so callers can pattern- matchSome(info)for the live-update case.- Download
File AirServiceProvider::DownloadFile- generic URL download routed through Air. Wrapscrate::Client::AirClient::AirClient::DownloadFilewith an empty header map.- Download
Stream AirServiceProvider::DownloadStream- initiate a streaming download. Wrapscrate::Client::AirClient::AirClient::DownloadStreamand returns the stream wrapper so callers can pump chunks via.next().await.- Download
Update AirServiceProvider::DownloadUpdate- fetch an update package via the Air daemon’sDownloaderService. Wrapscrate::Client::AirClient::AirClient::DownloadUpdateand supplies an empty header map by default.- GetConfiguration
AirServiceProvider::GetConfiguration- read a configuration section from the daemon. Wrapscrate::Client::AirClient::AirClient::GetConfiguration.- GetFile
Info AirServiceProvider::GetFileInfo- retrieve extended file metadata. Wrapscrate::Client::AirClient::AirClient::GetFileInfo.- GetMetrics
AirServiceProvider::GetMetrics- retrieve daemon-side metrics by optional type filter. Wrapscrate::Client::AirClient::AirClient::GetMetrics.- GetResource
Usage AirServiceProvider::GetResourceUsage- process resource counts. Wrapscrate::Client::AirClient::AirClient::GetResourceUsage.- GetStatus
AirServiceProvider::GetStatus- snapshot of the Air daemon’s uptime / request counters. Wrapscrate::Client::AirClient::AirClient::GetStatus.- Index
Files AirServiceProvider::IndexFiles- kick off a directory index pass on the Air daemon. Wrapscrate::Client::AirClient::AirClient::IndexFiles.- Search
Files AirServiceProvider::SearchFiles- query Air’s full-text index. Wrapscrate::Client::AirClient::AirClient::SearchFiles.- SetResource
Limits AirServiceProvider::SetResourceLimits- constrain the daemon’s resource budget. Wrapscrate::Client::AirClient::AirClient::SetResourceLimits.- Update
Configuration AirServiceProvider::UpdateConfiguration- patch a configuration section on the daemon. Wrapscrate::Client::AirClient::AirClient::UpdateConfiguration.
Structs§
- AirService
Provider - High-level provider over
AirClient. Holds the client in anArcso consumers can share one channel across the application.