View Source ExWal.Models.Segment (ex_wal v0.1.5)
A single segment file.
Description
The ExWal.Models.Segment
module represents a single segment unit.
It contains information about the path, index, buffer, block count, and blocks within the segment.
Examples
iex> segment = %ExWal.Models.Segment{path: "segment1.wal", index: 1, buf: "", block_count: 0, blocks: :array.new()}
%ExWal.Models.Segment{path: "segment1.wal", index: 1, buf: "", block_count: 0, blocks: :array.new()}
Struct Fields
path
- The path of the segment file.index
- The index of the segment.buf
- The binary buffer of the segment.block_count
- The count of blocks within the segment.blocks
- The array of blocks within the segment.
Summary
Types
@type t() :: %ExWal.Models.Segment{ block_count: non_neg_integer(), blocks: :array.array(ExWal.Models.Block.t()) | nil, buf: binary(), caches: :array.array(any()) | nil, index: non_neg_integer(), path: String.t() }