persistence

package
v0.3.2-0...-ef23f48 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2013 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Journal

type Journal struct {
	// contains filtered or unexported fields
}

Journal represents a file where doozer can save state. Doozer usally uses a list of multiple journals.

func NewJournal

func NewJournal(name string) (j *Journal, err error)

NewJournal opens the named file for synchronous I/O, creating it with mode 0640 if it does not exist and prepares it for logging operation. If successful, methods on the returned Journal can be used for I/O. It returns a Journal and an error, if any.

func (Journal) Close

func (j Journal) Close()

Close shuts down the journal.

func (Journal) Fsck

func (j Journal) Fsck() error

Fsck truncates the journal at the last read mutation. It removes data, so use with care.

func (Journal) ReadMutation

func (j Journal) ReadMutation() (m string, err error)

Retrieve reads the next mutation from the Journal. It returns the mutation and an error, if any. EOF is signaled by a nil mutation with err set to io.EOF

func (Journal) WriteMutation

func (j Journal) WriteMutation(m string) (err error)

Store writes the mutation to the Journal.

Directories

Path Synopsis
package doozer provides a github.com/ha/doozer compatible API to interract with persitence clients.
package doozer provides a github.com/ha/doozer compatible API to interract with persitence clients.
doozerp is a persistence client for doozerd.
doozerp is a persistence client for doozerd.

Jump to

Keyboard shortcuts

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