meta

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2023 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DeletedMark deletedMarkType
)
View Source
var ErrClosed = errors.New("MetaStore: closed")

Functions

func BatchDelete

func BatchDelete(ctx context.Context, s *SyncStore, keys [][]byte) error

func BatchStore

func BatchStore(ctx context.Context, s *SyncStore, kvs Ranger) error

func Delete

func Delete(ctx context.Context, s *SyncStore, key []byte) error

func ReviewSyncStore added in v0.9.0

func ReviewSyncStore(ctx context.Context, dir string, key []byte, watcher ReviewWatcher, opts ...walog.Option) error

func Store

func Store(ctx context.Context, s *SyncStore, key []byte, value interface{}) error

Types

type AsyncStore

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

func RecoverAsyncStore

func RecoverAsyncStore(ctx context.Context, dir string, opts ...walog.Option) (*AsyncStore, error)

func (*AsyncStore) BatchDelete

func (s *AsyncStore) BatchDelete(keys [][]byte)

func (*AsyncStore) BatchStore

func (s *AsyncStore) BatchStore(_ context.Context, kvs Ranger)

func (*AsyncStore) Close

func (s *AsyncStore) Close()

func (*AsyncStore) Delete

func (s *AsyncStore) Delete(key []byte)

func (*AsyncStore) Load

func (s *AsyncStore) Load(key []byte) (interface{}, bool)

func (*AsyncStore) Store

func (s *AsyncStore) Store(_ context.Context, key []byte, value interface{})

type Kind

type Kind uint8
const (
	Invalid Kind = iota
	Deleted
	True
	False
	Bytes
	String
	Int
	Int8
	Int16
	Int32
	Int64
	Uint
	Uint8
	Uint16
	Uint32
	Uint64
	Float32
	Float64
)

type Marshaler

type Marshaler interface {
	Marshal(data Ranger) ([]byte, error)
}

type RangeCallback

type RangeCallback func(key []byte, value interface{}) error

type Ranger

type Ranger interface {
	Range(cb RangeCallback) error
}

func KVRange

func KVRange(key []byte, value interface{}) Ranger

func SkiplistRange

func SkiplistRange(l *skiplist.SkipList) Ranger

type ReviewWatcher added in v0.9.0

type ReviewWatcher = func(value interface{}, version int64)

type StoreCallback

type StoreCallback = func(error)

type SyncStore

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

func RecoverSyncStore

func RecoverSyncStore(ctx context.Context, dir string, opts ...walog.Option) (*SyncStore, error)

func (*SyncStore) BatchDelete

func (s *SyncStore) BatchDelete(ctx context.Context, keys [][]byte, cb StoreCallback)

func (*SyncStore) BatchStore

func (s *SyncStore) BatchStore(ctx context.Context, kvs Ranger, cb StoreCallback)

func (*SyncStore) Close

func (s *SyncStore) Close(_ context.Context)

func (*SyncStore) Delete

func (s *SyncStore) Delete(ctx context.Context, key []byte, cb StoreCallback)

func (*SyncStore) Load

func (s *SyncStore) Load(key []byte) (interface{}, bool)

func (*SyncStore) Range

func (s *SyncStore) Range(begin, end []byte, cb RangeCallback) error

func (*SyncStore) Store

func (s *SyncStore) Store(ctx context.Context, key []byte, value interface{}, cb StoreCallback)

type Unmarshaler

type Unmarshaler interface {
	Unmarshal(data []byte, cb RangeCallback) error
}

Jump to

Keyboard shortcuts

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