lru

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2021 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LruStore

type LruStore struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func New

func New(cap int, backend storetypes.Store) (*LruStore, error)

func (*LruStore) Get

func (s *LruStore) Get(ctx context.Context, key string) (storetypes.KeyValue, error)

func (*LruStore) PrefixGet

func (s *LruStore) PrefixGet(ctx context.Context, prefix string) ([]storetypes.KeyValue, error)

func (*LruStore) PrefixGetKey

func (s *LruStore) PrefixGetKey(ctx context.Context, prefix string) ([]storetypes.Key, error)

func (*LruStore) PrefixRemove

func (s *LruStore) PrefixRemove(ctx context.Context, prefix string) ([]storetypes.KeyValue, error)

func (*LruStore) Put

func (s *LruStore) Put(ctx context.Context, key, value string) error

func (*LruStore) PutWithOption

func (s *LruStore) PutWithOption(ctx context.Context, key, value string, opts []interface{}) (interface{}, error)

func (*LruStore) Remove

func (s *LruStore) Remove(ctx context.Context, key string) (*storetypes.KeyValue, error)

Jump to

Keyboard shortcuts

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