file

package
v0.8.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2017 License: MPL-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFileBackend

func NewFileBackend(conf map[string]string, logger log.Logger) (physical.Backend, error)

NewFileBackend constructs a FileBackend using the given directory

func NewTransactionalFileBackend

func NewTransactionalFileBackend(conf map[string]string, logger log.Logger) (physical.Backend, error)

Types

type FileBackend

type FileBackend struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

FileBackend is a physical backend that stores data on disk at a given file path. It can be used for durable single server situations, or to develop locally where durability is not critical.

WARNING: the file backend implementation is currently extremely unsafe and non-performant. It is meant mostly for local testing and development. It can be improved in the future.

func (*FileBackend) Delete

func (b *FileBackend) Delete(path string) error

func (*FileBackend) DeleteInternal

func (b *FileBackend) DeleteInternal(path string) error

func (*FileBackend) Get

func (b *FileBackend) Get(k string) (*physical.Entry, error)

func (*FileBackend) GetInternal

func (b *FileBackend) GetInternal(k string) (*physical.Entry, error)

func (*FileBackend) List

func (b *FileBackend) List(prefix string) ([]string, error)

func (*FileBackend) ListInternal

func (b *FileBackend) ListInternal(prefix string) ([]string, error)

func (*FileBackend) Put

func (b *FileBackend) Put(entry *physical.Entry) error

func (*FileBackend) PutInternal

func (b *FileBackend) PutInternal(entry *physical.Entry) error

type TransactionalFileBackend

type TransactionalFileBackend struct {
	FileBackend
}

func (*TransactionalFileBackend) Transaction

func (b *TransactionalFileBackend) Transaction(txns []physical.TxnEntry) error

Jump to

Keyboard shortcuts

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