Skip to main content

Module AirServiceProvider

Module AirServiceProvider 

Source
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 (CheckForUpdates collapses update_available == false into Ok(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:

§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§

ApplyUpdate
AirServiceProvider::ApplyUpdate - tell the Air daemon to install a previously downloaded update. Wraps crate::Client::AirClient::AirClient::ApplyUpdate.
Authenticate
AirServiceProvider::Authenticate - authenticate a user with the Air daemon. Mints a request id, forwards to crate::Client::AirClient::AirClient::Authenticate, and surfaces the returned session token.
CheckForUpdates
AirServiceProvider::CheckForUpdates - probe the Air daemon for an available update. Wraps crate::Client::AirClient::AirClient::CheckForUpdates and collapses update_available == false into Ok(None) so callers can pattern- match Some(info) for the live-update case.
DownloadFile
AirServiceProvider::DownloadFile - generic URL download routed through Air. Wraps crate::Client::AirClient::AirClient::DownloadFile with an empty header map.
DownloadStream
AirServiceProvider::DownloadStream - initiate a streaming download. Wraps crate::Client::AirClient::AirClient::DownloadStream and returns the stream wrapper so callers can pump chunks via .next().await.
DownloadUpdate
AirServiceProvider::DownloadUpdate - fetch an update package via the Air daemon’s DownloaderService. Wraps crate::Client::AirClient::AirClient::DownloadUpdate and supplies an empty header map by default.
GetConfiguration
AirServiceProvider::GetConfiguration - read a configuration section from the daemon. Wraps crate::Client::AirClient::AirClient::GetConfiguration.
GetFileInfo
AirServiceProvider::GetFileInfo - retrieve extended file metadata. Wraps crate::Client::AirClient::AirClient::GetFileInfo.
GetMetrics
AirServiceProvider::GetMetrics - retrieve daemon-side metrics by optional type filter. Wraps crate::Client::AirClient::AirClient::GetMetrics.
GetResourceUsage
AirServiceProvider::GetResourceUsage - process resource counts. Wraps crate::Client::AirClient::AirClient::GetResourceUsage.
GetStatus
AirServiceProvider::GetStatus - snapshot of the Air daemon’s uptime / request counters. Wraps crate::Client::AirClient::AirClient::GetStatus.
IndexFiles
AirServiceProvider::IndexFiles - kick off a directory index pass on the Air daemon. Wraps crate::Client::AirClient::AirClient::IndexFiles.
SearchFiles
AirServiceProvider::SearchFiles - query Air’s full-text index. Wraps crate::Client::AirClient::AirClient::SearchFiles.
SetResourceLimits
AirServiceProvider::SetResourceLimits - constrain the daemon’s resource budget. Wraps crate::Client::AirClient::AirClient::SetResourceLimits.
UpdateConfiguration
AirServiceProvider::UpdateConfiguration - patch a configuration section on the daemon. Wraps crate::Client::AirClient::AirClient::UpdateConfiguration.

Structs§

AirServiceProvider
High-level provider over AirClient. Holds the client in an Arc so consumers can share one channel across the application.