snapdir_stores/lib.rs
1//! snapdir stores library.
2//!
3//! Storage backends for snapdir snapshots plus the store-routing and
4//! external-store shim that implement snapdir's store dispatch:
5//!
6//! - [`FileStore`] — the in-process `file://` backend.
7//! - [`S3Store`] — the native AWS-SDK `s3://` backend (ring rustls).
8//! - [`B2Store`] — the native AWS-SDK `b2://` backend, pointed at Backblaze
9//! B2's S3-compatible endpoint (wraps [`S3Store`] with a custom endpoint).
10//! - [`GcsStore`] — the native `google-cloud-storage` `gs://` backend
11//! (ring rustls; ADC credential chain).
12//! - [`router`] — scheme → adapter resolution, including the hardcoded
13//! `gs://`→`gcs` special case for the Google Cloud Storage adapter.
14//! - [`shim`] ([`ExternalStore`]) — the emit-command shim that dispatches
15//! third-party `snapdir-<name>-store` binaries via the documented
16//! `get-manifest-command` / `get-fetch-files-command` / `get-push-command`
17//! contract.
18//! - [`transfer`] ([`TransferConfig`], [`RateLimiter`], [`run_concurrent`]) —
19//! the concurrency + bandwidth-limiting foundation each store carries via a
20//! [`TransferConfig`] for the (later) concurrent transfer loops.
21
22pub mod b2_store;
23pub(crate) mod fetch;
24pub mod file_store;
25pub mod gcs_store;
26pub(crate) mod push;
27pub mod router;
28pub mod s3_store;
29pub mod shim;
30pub mod transfer;
31pub(crate) mod util;
32
33pub use b2_store::B2Store;
34pub use file_store::FileStore;
35pub use gcs_store::{GcsLocation, GcsStore};
36pub use router::{resolve_adapter, Adapter, RouteError};
37pub use s3_store::{S3Location, S3Store};
38pub use shim::ExternalStore;
39pub use transfer::{run_concurrent, RateLimiter, TransferConfig};