store

package
v0.0.0-...-b800767 Latest Latest
Warning

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

Go to latest
Published: May 28, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrKeyNotFound  = errors.New("store: key not found")
	ErrCasOperation = errors.New("store: cas operation error")
)

Functions

func NewIncUint32Request

func NewIncUint32Request(key []byte) ([]byte, error)

func NewIncUint64Request

func NewIncUint64Request(key []byte) ([]byte, error)

func NewPutRequest

func NewPutRequest(key, value []byte) ([]byte, error)

func NewPutWithCasRequest

func NewPutWithCasRequest(key, oldValue, newValue []byte) ([]byte, error)

func NewSnapshotHelper

func NewSnapshotHelper(r io.ReadCloser, eg *errgroup.Group,
	ctx context.Context, cancel context.CancelFunc) raft.FSMSnapshot

Types

type Interface

type Interface interface {
	raft.FSM

	GetCopy(key []byte) ([]byte, error)
	Read(key []byte, fn func(in []byte) error) error
	ReadPrefix(prefix []byte, fn func(in []byte) error) error
}

type SnapshotHelper

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

func (*SnapshotHelper) Persist

func (s *SnapshotHelper) Persist(sink raft.SnapshotSink) error

func (*SnapshotHelper) Release

func (s *SnapshotHelper) Release()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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