pub struct Config<T: Translator, C> {
pub translator: T,
pub metadata_partition: String,
pub key_partition: String,
pub key_page_cache: CacheRef,
pub value_partition: String,
pub compression: Option<u8>,
pub codec_config: C,
pub items_per_section: NonZeroU64,
pub key_write_buffer: NonZeroUsize,
pub value_write_buffer: NonZeroUsize,
pub replay_buffer: NonZeroUsize,
}Expand description
Configuration for Archive storage.
Fields§
§translator: TLogic to transform keys into their index representation.
Archive assumes that all internal keys are spread uniformly across the key space. If that is not the case, lookups may be O(n) instead of O(1).
metadata_partition: StringThe partition to use for per-section validation markers. Recovery adopts entries below a section’s marker without re-validating their values.
key_partition: StringThe partition to use for the key journal (stores index+key metadata).
key_page_cache: CacheRefThe page cache to use for the key journal.
value_partition: StringThe partition to use for the value blob (stores values).
compression: Option<u8>The compression level to use for the value blob.
codec_config: CThe commonware_codec::Codec configuration to use for the value stored in the archive.
items_per_section: NonZeroU64The number of items per section (the granularity of pruning).
Fixed for the life of the archive’s data. Records live in the section their index
selects, and Archive::init fails with crate::archive::Error::RecordCorrupted when a
stored record’s section no longer matches. Each retained section tracks its indices in a
vector spanning every offset up to its highest stored index (8 bytes each), so sparse
indices in a large section cost up to 8 * items_per_section bytes (see
Indexing).
key_write_buffer: NonZeroUsizeThe amount of bytes that can be buffered for the key journal before being written to a commonware_runtime::Blob.
value_write_buffer: NonZeroUsizeThe amount of bytes that can be buffered for the value journal before being written to a commonware_runtime::Blob.
replay_buffer: NonZeroUsizeThe buffer size to use when replaying a commonware_runtime::Blob.
Trait Implementations§
Auto Trait Implementations§
impl<T, C> !RefUnwindSafe for Config<T, C>
impl<T, C> !UnwindSafe for Config<T, C>
impl<T, C> Freeze for Config<T, C>
impl<T, C> Send for Config<T, C>where
C: Send,
impl<T, C> Sync for Config<T, C>where
C: Sync,
impl<T, C> Unpin for Config<T, C>
impl<T, C> UnsafeUnpin for Config<T, C>where
T: UnsafeUnpin,
C: UnsafeUnpin,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more