storetap

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: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TestStore

func TestStore(
	t *testing.T,
	testStore store.TestStore,
	scope dscope.Scope,
	wg *pr2.WaitGroup,
)

Types

type Def

type Def struct{}

func (Def) New

func (_ Def) New() New

type Funcs

type Funcs struct {
	ID func(store.ID, error)

	Write func(
		key.Namespace,
		sb.Stream,
		[]store.WriteOption,
		store.WriteResult,
		error,
	)

	Read func(
		key.Key,
		func(sb.Stream) error,
		error,
	)

	Exists func(
		key.Key,
		bool,
		error,
	)

	IterKeys func(
		key.Namespace,
		func(key.Key) error,
		error,
	)

	IterAllKeys func(
		fn func(key.Key) error,
		err error,
	)

	Delete func(
		[]key.Key,
		error,
	)
}

type New

type New func(upstream store.Store, funcs Funcs) *Store

type Store

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

func (*Store) Delete

func (s *Store) Delete(
	keys []key.Key,
) (err error)

func (*Store) Exists

func (s *Store) Exists(
	key key.Key,
) (exists bool, err error)

func (*Store) ID

func (s *Store) ID() (id store.ID, err error)

func (*Store) IterAllKeys

func (s *Store) IterAllKeys(
	fn func(key.Key) error,
) (err error)

func (*Store) IterKeys

func (s *Store) IterKeys(
	ns key.Namespace,
	fn func(key.Key) error,
) (err error)

func (*Store) Name

func (s *Store) Name() string

func (*Store) Read

func (s *Store) Read(
	key key.Key,
	fn func(sb.Stream) error,
) (err error)

func (*Store) Write

func (s *Store) Write(
	ns key.Namespace,
	stream sb.Stream,
	options ...store.WriteOption,
) (
	res store.WriteResult,
	err error,
)

Jump to

Keyboard shortcuts

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