wallaby

package module
v0.0.0-...-eaf2392 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 12, 2015 License: MIT Imports: 7 Imported by: 0

README

wallaby

A write-ahead log implementation with an index and snapshots

Currently under heavy development (not ready for use)

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 Create

func Create(filename string, config common.Config) (common.WriteAheadLog, error)

###### Implementation

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL