storelogger

package
v0.9.2 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2019 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Logger

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

Logger implements a zap.Logger for storage.KeyValueStore

func New

func New(log *zap.Logger, store storage.KeyValueStore) *Logger

New creates a new Logger with log and store

func (*Logger) Close

func (store *Logger) Close() error

Close closes the store

func (*Logger) Delete

func (store *Logger) Delete(key storage.Key) error

Delete deletes key and the value

func (*Logger) Get

func (store *Logger) Get(key storage.Key) (storage.Value, error)

Get gets a value to store

func (*Logger) GetAll

func (store *Logger) GetAll(keys storage.Keys) (storage.Values, error)

GetAll gets all values from the store corresponding to keys

func (*Logger) Iterate

func (store *Logger) Iterate(opts storage.IterateOptions, fn func(storage.Iterator) error) error

Iterate iterates over items based on opts

func (*Logger) List

func (store *Logger) List(first storage.Key, limit int) (storage.Keys, error)

List lists all keys starting from first and upto limit items

func (*Logger) Put

func (store *Logger) Put(key storage.Key, value storage.Value) error

Put adds a value to store

Jump to

Keyboard shortcuts

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