Trait rsdb::Log [] [src]

pub trait Log: Sized {
    fn reserve(&self, _: Vec<u8>) -> Reservation;
fn write(&self, _: Vec<u8>) -> u64;
fn read(&self, id: u64) -> Result<LogRead>;
fn stable_offset(&self) -> u64;
fn make_stable(&self, id: u64);
fn punch_hole(&self, id: u64);
fn config(&self) -> &Config; fn iter_from(&self, id: u64) -> LogIter<Self> { ... } }

A trait for objects which facilitate log-structured storage.

Required Methods

Create a log offset reservation for a particular write, which may later be filled or canceled.

Write a buffer to underlying storage.

Read a buffer from underlying storage.

Return the current stable offset.

Try to flush all pending writes up until the specified log offset.

Mark the provided message as deletable by the underlying storage.

Return the configuration in use by the system.

Provided Methods

Return an iterator over the log, starting with a specified offset.

Implementors