mem

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2021 License: AGPL-3.0 Imports: 5 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MemStore

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

func New

func New() (*MemStore, error)

func (*MemStore) Get

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

func (*MemStore) PrefixGet

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

TODO: better impl, instead of O(n)?

func (*MemStore) PrefixGetKey

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

func (*MemStore) PrefixRemove

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

func (*MemStore) Put

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

func (*MemStore) PutWithOption

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

func (*MemStore) Remove

func (s *MemStore) 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