storemem

package
v0.0.0-...-7899014 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Asc   = index.Asc
	Break = store.Break

	ErrKeyNotFound = storekv.ErrKeyNotFound
	ErrClosed      = store.ErrClosed
)

Functions

func TestIndex

func TestIndex(
	t *testing.T,
	test index.TestIndex,
	newManager New,
	wg *pr2.WaitGroup,
)

func TestStore

func TestStore(
	t *testing.T,
	test storekv.TestKV,
	newStore New,
	wg *pr2.WaitGroup,
)

Types

type Codec

type Codec = codec.Codec

type Def

type Def struct{}

func (Def) New

func (Def) New() New

type Index

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

func (Index) Delete

func (i Index) Delete(entry IndexEntry) (err error)

func (Index) Iter

func (i Index) Iter(
	lower *sb.Tokens,
	upper *sb.Tokens,
	order Order,
) (
	_ pp.Src,
	_ io.Closer,
	err error,
)

func (Index) Name

func (i Index) Name() string

func (Index) Save

func (i Index) Save(entry IndexEntry, options ...index.SaveOption) (err error)

type IndexEntry

type IndexEntry = index.Entry

type IndexTapEntry

type IndexTapEntry = index.TapEntry

type Key

type Key = key.Key

type New

type New func(ctx context.Context) *Store

type Order

type Order = index.Order

type Store

type Store struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func (*Store) CostInfo

func (s *Store) CostInfo() storekv.CostInfo

func (*Store) IndexFor

func (s *Store) IndexFor(id StoreID) (index.Index, error)

func (*Store) KeyDelete

func (s *Store) KeyDelete(keys ...string) error

func (*Store) KeyExists

func (s *Store) KeyExists(key string) (bool, error)

func (*Store) KeyGet

func (s *Store) KeyGet(key string, fn func(r io.Reader) error) (err error)

func (*Store) KeyIter

func (s *Store) KeyIter(prefix string, fn func(key string) error) error

func (*Store) KeyPut

func (s *Store) KeyPut(key string, r io.Reader) error

func (*Store) Name

func (s *Store) Name() string

func (*Store) StoreID

func (s *Store) StoreID() string

type StoreID

type StoreID = store.ID

type StoreIndex

type StoreIndex = index.StoreIndex

Jump to

Keyboard shortcuts

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