pub struct ColdStore { /* private fields */ }Implementations§
Source§impl ColdStore
impl ColdStore
Sourcepub async fn list_cold_index_pages(&self) -> Result<Vec<ColdIndexPageKey>>
pub async fn list_cold_index_pages(&self) -> Result<Vec<ColdIndexPageKey>>
Lists the authoritative cold-index pages rather than every chunk. One page covers 64 MiB of one stream, so this is the bounded discovery surface used by the background chunk compactor.
pub fn memory() -> Result<Self>
Sourcepub fn try_new(config: &ColdConfig) -> Result<Self>
pub fn try_new(config: &ColdConfig) -> Result<Self>
Build a ColdStore from an explicit ColdConfig.
The bootstrap layer assembles the typed config before calling this method;
this method is purely functional — it does not touch std::env.
Returns Err when the backend is ColdBackend::None;
the caller should skip construction when cold storage is disabled.
pub fn info(&self) -> &ColdStoreInfo
pub fn with_read_cache(self, config: ColdReadCacheParams) -> Self
pub fn without_read_cache(self) -> Self
pub fn set_observer( &self, observer: impl Fn(ColdStoreEvent) + Send + Sync + 'static, )
pub fn set_fault_policy( &self, policy: impl Fn(&ColdStoreFaultContext) -> Option<ColdStoreFaultEffect> + Send + Sync + 'static, )
pub fn clear_fault_policy(&self)
pub fn set_delay_fn<F, Fut>(&self, delay_fn: F)
pub async fn write_chunk(&self, path: &str, payload: &[u8]) -> Result<u64>
pub async fn delete_chunk(&self, path: &str) -> Result<()>
pub async fn remove_all(&self, path: &str) -> Result<()>
Sourcepub async fn prefix_is_empty(&self, path: &str) -> Result<bool>
pub async fn prefix_is_empty(&self, path: &str) -> Result<bool>
Proves that the object store has no file below path. Tenant purge
uses this after recursive deletion; a successful delete request alone
is not physical-absence evidence.
pub async fn read_chunk_range( &self, chunk: &ColdChunkRef, read_start_offset: u64, len: usize, ) -> Result<Vec<u8>>
pub async fn read_object_range_for_stream( &self, stream_id: &BucketStreamId, object: &ObjectPayloadRef, read_start_offset: u64, len: usize, ) -> Result<Vec<u8>>
pub async fn read_object_range( &self, object: &ObjectPayloadRef, read_start_offset: u64, len: usize, ) -> Result<Vec<u8>>
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for ColdStore
impl !UnwindSafe for ColdStore
impl Freeze for ColdStore
impl Send for ColdStore
impl Sync for ColdStore
impl Unpin for ColdStore
impl UnsafeUnpin for ColdStore
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
Mutably borrows from an owned value. Read more