Skip to main content

Module client

Module client 

Source
Expand description

S3 client construction and per-(profile, region) client pool.

§Design

Each (ProfileId, region) pair maps to a long-lived, Arc-wrapped aws_sdk_s3::Client. The pool is the single owner of all clients and is intended to live inside the Tauri AppState for the process lifetime.

Credential resolution is delegated to the AWS SDK credential-provider chain; no credentials are stored in the pool itself.

§Proxy wiring

ProxyConfig controls the HTTP connector:

  • System (default) — the SDK default connector reads HTTP_PROXY / HTTPS_PROXY / NO_PROXY from the environment automatically. No custom connector is injected.
  • Explicit(url) — a ConnectorBuilder with ProxyConfig::all(url) is injected via Builder::build_with_connector_fn, routing all traffic through the given proxy.
  • None — a ConnectorBuilder with ProxyConfig::disabled() is injected, explicitly ignoring any proxy env vars.

§OCP

Adding a ProxyConfig variant (e.g. Pac(url), PerHost { ... }) is the only change needed to support a new proxy mode. The internal build_http_client function has one match arm per variant.

Structs§

ClientBuilder
Parameters needed to build one aws_sdk_s3::Client.
ClientPool
Pool of Arc<aws_sdk_s3::Client> instances, keyed by (ProfileId, region).

Enums§

ProxyConfig
Controls the HTTP proxy used for all S3 requests built by this pool.

Functions§

build_http_client 🔒
surface_compat_warnings 🔒
Push each warning string into log (if provided) as a Severity::Warning notification, or fall through to tracing::warn! when log is None.