pub enum UploadSessionTransport {
ServiceProxied {
staging: ProxiedStaging,
},
DirectPut {
promised_content: ContentRef,
},
DirectMultipart {
provider_upload_id: String,
part_size_bytes: NonZeroU64,
checksum_algorithm: ChecksumAlgorithm,
},
}Expand description
The transport never changes, and each variant stores only the state required by that upload path.
Variants§
ServiceProxied
The service receives the bytes and writes the content object itself, so it learns size and digest from the bytes as they pass.
Fields
staging: ProxiedStagingExclusive staging progress, which applies only to this transport.
DirectPut
The client writes the whole object through one presigned request.
Fields
promised_content: ContentRefThe reference that signed write is minted for.
A direct-put client declares its byte length and SHA-256 before the write is authorized, because both are signed into the request and the provider refuses any body that does not match. Completion reads the stored object back against this same reference rather than believing it.
DirectMultipart
The client uploads parts and the provider assembles the object.
Multipart sessions do not store a content reference at creation because one-pass and streaming clients may not know the final size or checksum. The client supplies those values at completion, when LoonFS verifies the assembled object.
Fields
provider_upload_id: StringThe provider-side upload the parts assemble through, and the only provider handle LoonFS keeps: parts are the client’s bookkeeping, exactly as they are in the provider’s own API, so there is no durable record per part.
part_size_bytes: NonZeroU64Byte length of every part except the last, settled at begin.
A session resumed after a lost begin response reads its geometry from here rather than being told a second, possibly different, one. Zero is not a geometry, so it is not representable.
checksum_algorithm: ChecksumAlgorithmChecksum algorithm frozen when the session began. Part signing and completion must use this decision after any process restart.
Trait Implementations§
Source§impl Clone for UploadSessionTransport
impl Clone for UploadSessionTransport
Source§fn clone(&self) -> UploadSessionTransport
fn clone(&self) -> UploadSessionTransport
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more