Documentation ¶
Index ¶
- Variables
- type Meta
- type MetaContent
- type Offset
- type Reader
- type SegmentID
- func (z *SegmentID) DecodeMsg(dc *msgp.Reader) (err error)
- func (z SegmentID) EncodeMsg(en *msgp.Writer) (err error)
- func (segmentId SegmentID) FileName() string
- func (z SegmentID) MarshalMsg(b []byte) (o []byte, err error)
- func (z SegmentID) Msgsize() (s int)
- func (z *SegmentID) UnmarshalMsg(bts []byte) (o []byte, err error)
- type Wal
Constants ¶
This section is empty.
Variables ¶
View Source
var ZeroOffset = Offset{Segment: 0, Position: 0}
Functions ¶
This section is empty.
Types ¶
type Meta ¶
func NewWalMeta ¶
func (*Meta) Read ¶
func (walMeta *Meta) Read() (*MetaContent, error)
func (*Meta) Write ¶
func (walMeta *Meta) Write(content *MetaContent) error
type MetaContent ¶
func (*MetaContent) DecodeMsg ¶
func (z *MetaContent) DecodeMsg(dc *msgp.Reader) (err error)
DecodeMsg implements msgp.Decodable
func (*MetaContent) EncodeMsg ¶
func (z *MetaContent) EncodeMsg(en *msgp.Writer) (err error)
EncodeMsg implements msgp.Encodable
func (*MetaContent) Msgsize ¶
func (z *MetaContent) Msgsize() (s int)
Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
type Offset ¶
Offset denotes a position in WAL.
func (Offset) MarshalMsg ¶
MarshalMsg implements msgp.Marshaler
type SegmentID ¶
type SegmentID int64
SegmentID is a WAL segment sequence.
Denotes a single file-based segment of a write-ahead log. File name pattern:
wal-<version><ID>.bin
Here, <version> is a single digit WAL version ID stored for backwards compatibility <ID> is a 16-digit creation timestamp, up to microseconds
func NewSegmentID ¶
func NewSegmentID() SegmentID
func NewSegmentIDFromFile ¶
func (SegmentID) FileName ¶
FileName of WAL buffer which this segment references. noinspection GoReceiverNames
func (SegmentID) MarshalMsg ¶
MarshalMsg implements msgp.Marshaler
Click to show internal directories.
Click to hide internal directories.