Struct commitlog::CommitLog
[−]
[src]
pub struct CommitLog { /* fields omitted */ }The commit log is an append-only sequence of messages.
Methods
impl CommitLog[src]
fn new(opts: LogOptions) -> Result<CommitLog>
fn append(&mut self, payload: &[u8]) -> Result<Offset, AppendError>
Appends a log entry to the commit log, returning the offset of the appended entry.
fn read(&mut self,
start: ReadPosition,
limit: ReadLimit)
-> Result<Vec<Message>, ReadError>
start: ReadPosition,
limit: ReadLimit)
-> Result<Vec<Message>, ReadError>