git_lfs_transfer/lib.rs
1//! Concurrent transfer queue + transfer adapters for git-lfs.
2//!
3//! This is the orchestration layer: take a list of objects, call the batch
4//! API to negotiate URLs, then drive the actual byte movement (downloads
5//! into [`git_lfs_store::Store`], uploads from it). v0 only ships the
6//! `basic` adapter (`docs/api/basic-transfers.md`); tus, custom, and ssh
7//! adapters live in NOTES.md as deferred work.
8//!
9//! ## Concurrency
10//!
11//! [`Transfer`] runs at most [`TransferConfig::concurrency`] in-flight
12//! transfers at once. Each transfer uses its own retry loop with
13//! exponential backoff per [`TransferConfig`].
14//!
15//! ## Sync/async bridge
16//!
17//! [`git_lfs_store::Store`] is a sync API. Downloads pipe HTTP body bytes
18//! through [`tokio_util::io::SyncIoBridge`] into a `spawn_blocking` task
19//! that calls `store.insert_verified`, so we never buffer the full object
20//! in memory.
21
22mod basic;
23mod config;
24mod error;
25mod event;
26mod transfer;
27
28pub use config::TransferConfig;
29pub use error::{Report, TransferError};
30pub use event::Event;
31pub use transfer::Transfer;