Skip to content

binjip978/wal

Repository files navigation

Embedded Write Ahead Log

Simple multi segment write ahead log. Writes two type of files files *.index and *.store. Configurable maximum index and store file sizes.

Files stucuture:

  • Index record structure: [recordID (8 bytes)][recordOffset (8 bytes)]
  • Store record structure: [size (8 bytes)][data (variable bytes)]

Usage example

wl, _ := wal.New(".", nil)
offset, _ := wl.Append(data)
data, _ := wl.Read(offset)
wl.Close()

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages