Skip to content
Please note that GitHub no longer supports Internet Explorer.

We recommend upgrading to the latest Microsoft Edge, Google Chrome, or Firefox.

Learn more
Write ahead log for Go.
Go
Branch: master
Clone or download
Cannot retrieve the latest commit at this time.
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore
LICENSE first commit Dec 31, 2019
README.md first commit Dec 31, 2019
wal.go
wal_test.go

README.md

wal

GoDoc

Write ahead log for Go.

Features

  • High durability
  • Fast writes
  • Low memory footprint
  • Monotonic indexes
  • Log truncation from front or back.

Getting Started

Installing

To start using wal, install Go and run go get:

$ go get -u github.com/tidwall/wal

This will retrieve the library.

Example

// open a new log file
l, _ := Open("mylog", nil)

// write some entries
l.Write(1, []byte("first entry"))
l.Write(2, []byte("second entry"))
l.Write(3, []byte("third entry"))

// read an entry
data, _ := l.Read(1)
println(string(data))  // output: first entry

// close the log
l.Close()

Contact

Josh Baker @tidwall

License

wal source code is available under the MIT License.

You can’t perform that action at this time.