keyset

package
v0.0.0-...-7899014 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Break = errors.New("break")

Functions

func TestSet

func TestSet(
	t *testing.T,
	scope Scope,
)

Types

type Add

type Add func(
	set Set,
	keys ...Key,
) (
	Set,
	error,
)

type Def

type Def struct{}

func (Def) Add

func (_ Def) Add(
	fetch entity.Fetch,
	save entity.SaveEntity,
) Add

func (Def) Delete

func (_ Def) Delete(
	fetch entity.Fetch,
) Delete

func (Def) Has

func (_ Def) Has(
	fetch entity.Fetch,
) Has

func (Def) Iter

func (_ Def) Iter(
	fetch entity.Fetch,
) Iter

func (Def) PackSet

func (Def) PackSet(
	threshold PackThreshold,
	saveEntity entity.SaveEntity,
) PackSet

func (Def) PackThreshold

func (Def) PackThreshold() PackThreshold

type Delete

type Delete func(
	set Set,
	keys ...Key,
) (
	newSet Set,
	err error,
)

type Has

type Has func(
	set Set,
	key Key,
) (
	ok bool,
	err error,
)

type Iter

type Iter func(
	set Set,
	fn func(key Key) error,
) error

type Key

type Key = key.Key

type Pack

type Pack struct {
	Min    Key
	Max    Key
	Height int
	Key    Key // key of KeySet
}

type PackSet

type PackSet func(
	ctx context.Context,
	set Set,
) (
	Set,
	error,
)

type PackThreshold

type PackThreshold int

type Partition

type Partition struct {
	Begin  int
	End    int
	Height int
	Weight int
}

type Scope

type Scope = dscope.Scope

type Set

type Set []SetItem

type SetItem

type SetItem struct {
	Key  *Key
	Pack *Pack
}

Jump to

Keyboard shortcuts

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