Expand description
Backend factory: turns a parsed RemoteUrl into an
Arc<dyn ObjectStore> for the protocol REPL to drive.
Both S3 and Azure Blob are wired here.
§Eager probe and categorical error mapping
After constructing the SDK client, build runs a single low-cost
listing call (max_keys=1 for S3, maxresults=1 for Azure) and folds
well-known failures into categorical BackendError variants. Helper
binaries pattern-match on these variants via fatal_message to emit
single-line fatal: diagnostics.
The probe runs once at backend construction. Per-call errors during
fetch / push continue to flow through their existing typed paths.
Re-exports§
pub use crate::url::BackendKind;
Enums§
- Backend
Error - Errors surfaced by
build.
Functions§
- build
- Construct the right
ObjectStoreforremote, verify it is reachable with a single low-cost list call, and resolve the storage engine from theFORMATkey in one pass. - fatal_
message - Render
erras a single-linefatal:diagnostic helper binaries write to stderr. - validate_
format - Read the
FORMATkey at<prefix>/FORMATand validate it against the engine declared in the URL.kindselects S3 vs Azure vocabulary in the error variants this function can surface (BackendError::UnknownStoredEngine,BackendError::EngineMismatch). ReturnsOk(())when: