lpi

package
v1.4.2 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Overview

Package lpi: local page iterator

  • Copyright (c) 2025, NVIDIA CORPORATION. All rights reserved.

Package lpi: local page iterator

  • Copyright (c) 2025, NVIDIA CORPORATION. All rights reserved.

Package lpi: local page iterator

  • Copyright (c) 2025, NVIDIA CORPORATION. All rights reserved.

Index

Constants

View Source
const (
	// to fill `Page` with the entire remaining content,
	// with no limits that may otherwise be imposed by
	// page size (`Msg.Size`) and/or end-of-page (`Msg.EOP`)
	AllPages = ""
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Iter

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

local page iterator (LPI) NOTE: it is caller's responsibility to serialize access _or_ take locks.

func New

func New(root, prefix string, smap *meta.Smap) (*Iter, error)

func (*Iter) Callback

func (lpi *Iter) Callback(pathname string, de *godirwalk.Dirent) (err error)

func (*Iter) Clear

func (lpi *Iter) Clear()

func (*Iter) ErrorCallback

func (*Iter) ErrorCallback(pathname string, err error) godirwalk.ErrorAction

func (*Iter) Next

func (lpi *Iter) Next(msg Msg, out Page) error

func (*Iter) Pos

func (lpi *Iter) Pos() string

type Lpis

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

func (*Lpis) Do

func (lpis *Lpis) Do(lastPage cmn.LsoEntries, outPage *cmn.LsoRes, tag string, last bool)

func (*Lpis) Init

func (lpis *Lpis) Init(bck *cmn.Bck, prefix string, smap *meta.Smap)

type Msg

type Msg struct {
	EOP  string // until end-of-page marker
	Size int    // so-many entries
}

type Page

type Page map[string]int64 // [name => size] TODO: [name => lom] for props

Jump to

Keyboard shortcuts

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