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
tidwall Fix corrupt JSON format with non-UT8 binary
The JSON output format has been changed to support valid utf8 and
non-utf8 binary data. Valid utf8 has a '+' prefix and store the
data as a standard JSON string. Binary has a '$' prefix and store
the data in base64.

fixes #1
Latest commit 9c44081 Jan 31, 2020
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore
LICENSE
README.md
wal.go Fix corrupt JSON format with non-UT8 binary Jan 31, 2020
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.