pub struct Engine<F = DefaultFileSystem, P = FilePipeLog<F>>where
    F: FileSystem,
    P: PipeLog,
{ /* private fields */ }

Implementations

Writes the content of log_batch into the engine and returns written bytes. If sync is true, the write will be followed by a call to fdatasync on the log file.

Synchronizes the Raft engine.

Iterates over [start_key, end_key) range of Raft Group key-values and yields messages of the required type. Unparsable items are skipped.

Iterates over [start_key, end_key) range of Raft Group key-values and yields all key value pairs as bytes.

source

pub fn get_entry<M: MessageExt>(
    &self,
    region_id: u64,
    log_idx: u64
) -> Result<Option<M::Entry>>

Purges expired logs files and returns a set of Raft group ids that need to be compacted.

Returns count of fetched entries.

Deletes log entries before index in the specified Raft group. Returns the number of deleted entries.

Returns true if the engine contains no Raft Group. Empty Raft Group that isn’t cleaned is counted as well.

Returns the sequence number range of active log files in the specific log queue. For testing only.

Returns a list of corrupted Raft groups, including their ids and last valid log index. Head or tail corruption cannot be detected.

Dumps all operations.

Trait Implementations

Executes the destructor for this type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.