pub struct TransferConfig {
pub concurrency: usize,
pub max_attempts: u32,
pub initial_backoff: Duration,
pub backoff_max: Duration,
pub url_rewriter: Option<Arc<dyn Fn(&str) -> String + Send + Sync>>,
pub batch_size: usize,
}Expand description
Tunables for the transfer queue.
Defaults aim at “sensible for a developer laptop on a corporate VPN” —
not too aggressive on concurrency, generous retries for flaky links.
Upstream Git LFS scales concurrency to CPU count (commit aa08c37f);
we hard-code 8 for v0 and let callers override.
Fields§
§concurrency: usizeMax number of concurrent in-flight transfers.
max_attempts: u32Total attempts per object — including the first. So 3 means “try once, then up to 2 retries”.
initial_backoff: DurationSleep before the first retry. Doubled before each subsequent retry,
capped at backoff_max.
backoff_max: DurationUpper bound for exponential backoff between retries.
url_rewriter: Option<Arc<dyn Fn(&str) -> String + Send + Sync>>Optional rewriter applied to every action URL before transfer.
None ⇒ use action URLs verbatim.
batch_size: usizeMax objects per POST /objects/batch call. The transfer queue
chunks the input list into runs of this size and issues one
batch API call per chunk. Default: 100 (matches upstream’s
lfs.transfer.batchSize default). Values < 1 are clamped to 1.
Trait Implementations§
Source§impl Clone for TransferConfig
impl Clone for TransferConfig
Source§fn clone(&self) -> TransferConfig
fn clone(&self) -> TransferConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more