storage

package
v0.98.3 Latest Latest
Warning

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

Go to latest
Published: May 7, 2022 License: MIT Imports: 3 Imported by: 3

Documentation

Index

Constants

View Source
const (
	FindDefault      = 0
	FindKeysOnly     = 1 << 0
	FindRemovePrefix = 1 << 1
	FindValuesOnly   = 1 << 2
	FindDeserialize  = 1 << 3
	FindPick0        = 1 << 4
	FindPick1        = 1 << 5

	FindAll = FindDefault | FindKeysOnly | FindRemovePrefix | FindValuesOnly |
		FindDeserialize | FindPick0 | FindPick1
)

Storage iterator options.

Variables

This section is empty.

Functions

This section is empty.

Types

type Iterator

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

Iterator is an iterator state representation.

func NewIterator

func NewIterator(seekCh chan storage.KeyValue, prefix []byte, opts int64) *Iterator

NewIterator creates a new Iterator with given options for a given channel of store.Seek results.

func (*Iterator) Next

func (s *Iterator) Next() bool

Next advances the iterator and returns true if Value can be called at the current position.

func (*Iterator) Value

func (s *Iterator) Value() stackitem.Item

Value returns current iterators value (exact type depends on options this iterator was created with).

Jump to

Keyboard shortcuts

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