Skip to content

study-go/wal

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Write ahead log for Go.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 100.0%