switchable

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Snapshot

type Snapshot struct {
	kvdb.Snapshot
	// contains filtered or unexported fields
}

func Wrap

func Wrap(snap kvdb.Snapshot) *Snapshot

func (*Snapshot) Get

func (s *Snapshot) Get(key []byte) ([]byte, error)

Get returns key-value pair by key.

func (*Snapshot) Has

func (s *Snapshot) Has(key []byte) (bool, error)

Has checks if key is in the exists.

func (*Snapshot) NewIterator

func (s *Snapshot) NewIterator(prefix []byte, start []byte) kvdb.Iterator

NewIterator creates a binary-alphabetical iterator over a subset of database content with a particular key prefix, starting at a particular initial key (or after, if it does not exist).

func (*Snapshot) Release

func (s *Snapshot) Release()

func (*Snapshot) SwitchTo

func (s *Snapshot) SwitchTo(snap kvdb.Snapshot) kvdb.Snapshot

Jump to

Keyboard shortcuts

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