storelogger

package
v1.80.9 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2023 License: AGPL-3.0 Imports: 6 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 kvstore.Store.

func New

func New(log *zap.Logger, store kvstore.Store) *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(ctx context.Context, key kvstore.Key) (err error)

Delete deletes key and the value.

func (*Logger) Get

func (store *Logger) Get(ctx context.Context, key kvstore.Key) (_ kvstore.Value, err error)

Get gets a value to store.

func (*Logger) Put

func (store *Logger) Put(ctx context.Context, key kvstore.Key, value kvstore.Value) (err error)

Put adds a value to store.

func (*Logger) Range

func (store *Logger) Range(ctx context.Context, fn func(context.Context, kvstore.Key, kvstore.Value) error) (err error)

Range iterates over all items in unspecified order.

Jump to

Keyboard shortcuts

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