Documentation ¶
Index ¶
- type Logger
- func (store *Logger) Close() error
- func (store *Logger) CompareAndSwap(ctx context.Context, key storage.Key, oldValue, newValue storage.Value) (err error)
- func (store *Logger) Delete(ctx context.Context, key storage.Key) (err error)
- func (store *Logger) DeleteMultiple(ctx context.Context, keys []storage.Key) (_ storage.Items, err error)
- func (store *Logger) Get(ctx context.Context, key storage.Key) (_ storage.Value, err error)
- func (store *Logger) GetAll(ctx context.Context, keys storage.Keys) (_ storage.Values, err error)
- func (store *Logger) Iterate(ctx context.Context, opts storage.IterateOptions, ...) (err error)
- func (store *Logger) IterateWithoutLookupLimit(ctx context.Context, opts storage.IterateOptions, ...) (err error)
- func (store *Logger) List(ctx context.Context, first storage.Key, limit int) (_ storage.Keys, err error)
- func (store *Logger) LookupLimit() int
- func (store *Logger) Put(ctx context.Context, key storage.Key, value storage.Value) (err error)
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) CompareAndSwap ¶ added in v0.16.0
func (store *Logger) CompareAndSwap(ctx context.Context, key storage.Key, oldValue, newValue storage.Value) (err error)
CompareAndSwap atomically compares and swaps oldValue with newValue.
func (*Logger) DeleteMultiple ¶ added in v0.33.2
func (store *Logger) DeleteMultiple(ctx context.Context, keys []storage.Key) (_ storage.Items, err error)
DeleteMultiple deletes keys ignoring missing keys.
func (*Logger) Iterate ¶
func (store *Logger) Iterate(ctx context.Context, opts storage.IterateOptions, fn func(context.Context, storage.Iterator) error) (err error)
Iterate iterates over items based on opts.
func (*Logger) IterateWithoutLookupLimit ¶ added in v1.4.1
func (store *Logger) IterateWithoutLookupLimit(ctx context.Context, opts storage.IterateOptions, fn func(context.Context, storage.Iterator) error) (err error)
IterateWithoutLookupLimit calls the callback with an iterator over the keys, but doesn't enforce default limit on opts.
func (*Logger) List ¶
func (store *Logger) List(ctx context.Context, first storage.Key, limit int) (_ storage.Keys, err error)
List lists all keys starting from first and upto limit items.
func (*Logger) LookupLimit ¶ added in v0.31.0
LookupLimit returns the maximum limit that is allowed.
Click to show internal directories.
Click to hide internal directories.