pub enum ResourceReceiveMode {
Memory {
max_bytes: u64,
},
TemporaryFile {
directory: PathBuf,
max_bytes: Option<u64>,
},
Stream {
max_bytes: Option<u64>,
},
}Expand description
How independent incoming Resources are delivered to the application.
Variants§
Memory
Assemble the complete logical Resource in memory.
Nodes can verify compressed, single-segment application Resources of 16 KiB through the efficient segment limit on a lazy receive worker. Authentication remains on the driver. Worker admission reserves owned input and worst-case output/metadata capacity: four jobs and 256 MiB, allowing one job at the default 64 MiB decoder limit. This reservation is not preallocated memory or a whole-node RSS cap; native codec workspace and unrelated transfers are additional. Small, split, request/response and saturated work stays synchronous. Earlier same-link assemblies finish first, so overload can still stall the driver. Shutdown joins active work.
TemporaryFile
Write verified segments to a managed temporary file.
Stream
Hand each verified segment to the application as it arrives
(Callbacks::on_resource_segment),
in order, then report the whole Resource received
(Callbacks::on_resource_stream_received).
Memory stays bounded by about one segment (at most the efficient
segment size, 1 MiB) whatever the Resource’s size. A Resource of one
segment arrives the same way, as one segment at offset 0. A transfer
that fails after some segments were delivered is reported through
Callbacks::on_resource_failed;
the application discards what it received of it. Requests and
responses are delivered as before.