Documentation
¶
Overview ¶
wallaby - Write Ahead Log ¶
This file contains all of the errors, constants and entry points for wallaby.
Package wallaby contains a few different log middlemares which intercept log writes for different reasons such as buffering the writes.
By default all writes into the log are atomic and are flushed to disk immediately. Having middleware allows the write strategy to be tweaked.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewAtomicWriter ¶
func NewAtomicWriter(file *os.File) io.WriteCloser
NewAtomicWriter is built-in middleware which wrapps all file writes. Each write is flushed to disk and a close also closes the underlying file. > The atomic middleware is implemented as an `atomicWriteCloser`.
Types ¶
type DecorativeWriteCloser ¶
type DecorativeWriteCloser func(io.WriteCloser) io.WriteCloser
`DecorativeWriteCloser` allows for middleware around the internal file writer.
var DefaultBufferedWriter DecorativeWriteCloser = NewBufferedWriter(65536)
DefaultBufferedWriter is pre-configured middleware with a buffer size of 64KB
func NewBufferedWriter ¶
func NewBufferedWriter(size int) DecorativeWriteCloser
NewBufferedWriter creates a buffered writer with the given buffer size. A `DecorativeWriteCloser` is returned which wraps the log's internal `io.WriteCloser` in a `bufio.Writer`.
Directories
¶
Path | Synopsis |
---|---|
Godeps
|
|
_workspace/src/github.com/edsrzf/mmap-go
Package mmap allows mapping files into memory.
|
Package mmap allows mapping files into memory. |
_workspace/src/github.com/stretchr/testify/assert
A set of comprehensive testing tools for use with the normal Go testing system.
|
A set of comprehensive testing tools for use with the normal Go testing system. |