runpage

package
v1.138.1 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package runpage is a script's run history read a page at a time (#1972): the filter a request's query asks for, and the total the page reports, which is every run the filter matches rather than the rows one page holds.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Filter

func Filter(scriptID string, q url.Values, defaultLimit int) script.RunFilter

Filter is the run history of one script a query asks for: status, live, per_page (defaulting to defaultLimit) and the 1-based page.

func Total

func Total(ctx context.Context, store any, filter script.RunFilter, rows int) int

Total is every run the filter matches: the store's count when it keeps one, and otherwise, or when the count fails, the rows the page holds plus the ones it skipped, which is the most that is known.

Types

type Counter

type Counter interface {
	CountRuns(ctx context.Context, filter script.RunFilter) (int, error)
}

Counter counts the runs a filter matches, without the page cap. The PostgreSQL run store is one; a store that is not reports what it knows.

Jump to

Keyboard shortcuts

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