scannerstate

package
v0.57.0 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package scannerstate stores scanner checkpoints without copying live arrays when the number of recorded nodes grows.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Set

type Set[T any] struct {
	// contains filtered or unexported fields
}

Set associates a node index with a checkpoint. Chunks grow geometrically up to maxChunk, then linearly. Indexes and references have separate backing arrays so aligning a reference cannot add padding to every index.

func (*Set[T]) Bytes

func (s *Set[T]) Bytes() int64

func (*Set[T]) EnsureCapacity

func (s *Set[T]) EnsureCapacity(n int) int64

func (*Set[T]) Lookup

func (s *Set[T]) Lookup(idx int) (T, bool)

func (*Set[T]) Reset

func (s *Set[T]) Reset()

func (*Set[T]) Slots

func (s *Set[T]) Slots() uint64

func (*Set[T]) Upsert

func (s *Set[T]) Upsert(idx int, ref T) int64

Upsert returns the growth in retained backing bytes, including the directory.

Jump to

Keyboard shortcuts

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