multival

package
v0.0.0-...-c2b9891 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2024 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 MultiValue

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

func Append

func Append(mv *MultiValue, v *Value) *MultiValue

Append returns a clone of the input multi-value added with a newer version to end. Input value version *must* be larger than all existing versions.

func Compact

func Compact(mv *MultiValue, minVersion int64) *MultiValue

Compact drops older data before the given version when it is not the only version. Returns the same input multi-value if no compaction can be performed; otherwise, returns a clone of the input multi-value.

func (*MultiValue) Empty

func (mv *MultiValue) Empty() bool

func (*MultiValue) Fetch

func (mv *MultiValue) Fetch(version int64) (*Value, bool)

Fetch returns the value found at the given version or the closest lower version to the given version.

func (*MultiValue) String

func (mv *MultiValue) String() string

type Value

type Value struct {
	Version int64
	Data    []byte
	Deleted bool
}

func (*Value) String

func (v *Value) String() string

Jump to

Keyboard shortcuts

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