Skip to main content

Module transfer

Module transfer 

Source
Expand description

In-flight upload sessions.

Bytes land in a staging file and are renamed into place only after the whole transfer verifies. A partial file therefore never appears at the destination — a consumer polling that path sees nothing or sees the finished article.

Structs§

FinishedUpload
A session whose bytes are all in and whose digest has been computed.
UploadStore
All in-flight uploads for this process.

Enums§

UploadError
Why an upload operation was refused.

Constants§

DEFAULT_CHUNK_SIZE
Chunk size advertised to clients, and the ceiling a chunk may not exceed.
MAX_CHUNK_SIZE
Largest value --fs-chunk-size may name. At or above the relay’s ceiling every relayed transfer would 413, and the symptom looks like a server bug.
SESSION_TTL
How long a session may sit idle before it is swept.

Functions§

sweep_orphan_parts
Remove staging files left behind by a previous run.
sweep_orphan_parts_in
sweep_orphan_parts against one staging directory, removing only files that have been untouched for at least min_age.