ixbuf

package
v0.0.0-...-f022186 Latest Latest
Warning

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

Go to latest
Published: May 29, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package ixbuf defines an ordered list ixbuf.T with a mutating Insert and a immutable persistent Merge. It is designed for intermediate numbers of values, e.g. up to 16k or so. It is used mutably for per transaction index buffers and immutably for global index buffers.

Index

Constants

View Source
const Delete = 1 << 63
View Source
const Update = 1 << 62

Variables

This section is empty.

Functions

func Combine

func Combine(off1, off2 uint64) uint64

func Merge

func Merge(ibs ...*ixbuf) *ixbuf

Merge combines several ixbuf's into a new one. It does not modify its inputs so it is thread-safe as long as the inputs don't change. It is immutable persistent and the result may share chunks of the inputs so again, the inputs cannot change.

func OffString

func OffString(off uint64) string

OffString is for debugging

Types

type Iter

type Iter = func() (key string, off uint64, ok bool)

type Iterator

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

Iterator is a Suneido style iterator for an ixbuf.

func (*Iterator) Cur

func (it *Iterator) Cur() (string, uint64)

func (*Iterator) Eof

func (it *Iterator) Eof() bool

func (*Iterator) Modified

func (it *Iterator) Modified() bool

func (*Iterator) Next

func (it *Iterator) Next()

func (*Iterator) Prev

func (it *Iterator) Prev()

func (*Iterator) Range

func (it *Iterator) Range(rng Range)

func (*Iterator) Rewind

func (it *Iterator) Rewind()

func (*Iterator) Seek

func (it *Iterator) Seek(key string)

func (*Iterator) SeekAll

func (it *Iterator) SeekAll(key string)

type Range

type Range = iterator.Range

type T

type T = ixbuf

Jump to

Keyboard shortcuts

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