pub struct ExternalLocationConfig {
pub threshold_bytes: usize,
pub compression: Compression,
pub storage: Arc<dyn ExternalStorage>,
pub fetcher: Arc<dyn Fetcher>,
pub url_validator: UrlValidator,
pub max_decompressed_bytes: usize,
}Expand description
Externalization configuration.
Fields§
§threshold_bytes: usizePayload size in bytes at which a batch is eligible for externalization. Smaller batches stay inline. Default 1 MiB.
compression: CompressionCompression applied to the IPC bytes before upload. Default
Compression::None.
storage: Arc<dyn ExternalStorage>Upload backend. Required when externalization is enabled.
fetcher: Arc<dyn Fetcher>Resolver used on the read side. Required when resolving inbound pointer batches.
url_validator: UrlValidatorURL validator run on both the upload (post-signing) and fetch
(pre-download) paths. Defaults to safe_https_validator, which
rejects non-https URLs and internal/non-routable hosts. Reject
a URL by returning Err.
max_decompressed_bytes: usizeHard ceiling on the post-decompression size of a fetched
payload. Zstd frames carry their decompressed size in the
header and zstd::decode_all would otherwise trust it
eagerly — a small malicious payload claiming gigabytes of
output would OOM the client. Default 1 GiB. Set to usize::MAX
to disable.
Implementations§
Source§impl ExternalLocationConfig
impl ExternalLocationConfig
pub fn new(storage: Arc<dyn ExternalStorage>, fetcher: Arc<dyn Fetcher>) -> Self
pub fn with_threshold_bytes(self, n: usize) -> Self
pub fn with_compression(self, c: Compression) -> Self
pub fn with_url_validator(self, v: UrlValidator) -> Self
Sourcepub fn with_max_decompressed_bytes(self, n: usize) -> Self
pub fn with_max_decompressed_bytes(self, n: usize) -> Self
Override the hard ceiling on post-decompression payload size.
Pass usize::MAX to disable. Default is 1 GiB.
Trait Implementations§
Source§impl Clone for ExternalLocationConfig
impl Clone for ExternalLocationConfig
Source§fn clone(&self) -> ExternalLocationConfig
fn clone(&self) -> ExternalLocationConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more