cachekv

package
v0.49.0-rc3 Latest Latest
Warning

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

Go to latest
Published: May 8, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsKeyInDomain added in v0.47.0

func IsKeyInDomain(key, start, end []byte) bool

Types

type Store

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

Store wraps an in-memory cache around an underlying types.KVStore. Set, Delete and Write for the same key must be called sequentially.

func NewStore

func NewStore(parent types.KVStore) *Store

NewStore creates a new Store object

func (*Store) CacheWrap

func (store *Store) CacheWrap() types.CacheWrap

CacheWrap implements CacheWrapper.

func (*Store) CacheWrapWithListeners added in v0.47.0

func (store *Store) CacheWrapWithListeners(storeKey types.StoreKey, listeners []types.WriteListener) types.CacheWrap

CacheWrapWithListeners implements the CacheWrapper interface.

func (*Store) CacheWrapWithTrace

func (store *Store) CacheWrapWithTrace(w io.Writer, tc types.TraceContext) types.CacheWrap

CacheWrapWithTrace implements the CacheWrapper interface.

func (*Store) Delete

func (store *Store) Delete(key []byte)

Delete implements types.KVStore.

func (*Store) Get

func (store *Store) Get(key []byte) (value []byte)

Get implements types.KVStore.

func (*Store) GetStoreType

func (store *Store) GetStoreType() types.StoreType

GetStoreType implements Store.

func (*Store) Has

func (store *Store) Has(key []byte) bool

Has implements types.KVStore.

func (*Store) Iterator

func (store *Store) Iterator(start, end []byte) types.Iterator

Iterator implements types.KVStore.

func (*Store) ReverseIterator

func (store *Store) ReverseIterator(start, end []byte) types.Iterator

ReverseIterator implements types.KVStore.

func (*Store) Set

func (store *Store) Set(key []byte, value []byte)

Set implements types.KVStore.

func (*Store) Write

func (store *Store) Write()

Implements Cachetypes.KVStore.

Jump to

Keyboard shortcuts

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