pager

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2026 License: LGPL-2.1 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// PageSize is the internal keyset batch size; RAM is limited to one page.
	PageSize = 1024

	// MaxVersions caps versions in one built list to limit cold-build work on huge histories.
	MaxVersions = 10000
)

Variables

This section is empty.

Functions

func EachVersion

func EachVersion(ctx context.Context, store VersionListerInterface, key string, cb func(core.VersionObj) (stop bool, err error)) error

EachVersion walks key versions newest-first in PageSize batches while holding one page in RAM. The callback can stop the walk or return an error; the cursor advances by the last page item.

Types

type VersionListerInterface

type VersionListerInterface interface {
	ListVersionsKeyset(ctx context.Context, key string, includeDeleted bool, afterSeq int64, afterVersion string, limit int) ([]core.VersionObj, error)
}

VersionListerInterface provides keyset access to key versions.

Jump to

Keyboard shortcuts

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