pub struct Config<T: Translator, C> {
pub translator: T,
pub key_partition: String,
pub key_buffer_pool: PoolRef,
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).
key_partition: StringThe partition to use for the key journal (stores index+key metadata).
key_buffer_pool: PoolRefThe buffer pool 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).
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> Freeze for Config<T, C>
impl<T, C> !RefUnwindSafe 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> !UnwindSafe for Config<T, C>
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
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>
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