sqlite

package
v0.78.6 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2026 License: AGPL-3.0 Imports: 6 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package sqlite is the SQLite-backed adapter for the metrics.Store port, reading the same repos/runs/jobs/steps tables ingestion writes to.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Store

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

Store implements metrics.Store against a SQLite database.

func NewStore

func NewStore(db *sql.DB) *Store

NewStore returns a Store.

func (*Store) ActiveQuarantines added in v0.72.0

func (s *Store) ActiveQuarantines(ctx context.Context, now time.Time) (map[metrics.QuarantineKey]metrics.Quarantine, error)

ActiveQuarantines implements metrics.Store. A mark whose expiry has passed is left in the table and ignored here; the next QuarantineStep replaces it.

func (*Store) ListPipelines

func (s *Store) ListPipelines(ctx context.Context, filter metrics.PipelineListFilter) ([]metrics.PipelineRef, bool, error)

ListPipelines implements metrics.Store.

func (*Store) ListRuns added in v0.55.0

func (s *Store) ListRuns(ctx context.Context, filter metrics.RunListFilter) ([]metrics.RunEntry, bool, error)

ListRuns implements metrics.Store.

func (*Store) PipelineRuns

func (s *Store) PipelineRuns(ctx context.Context, ref metrics.PipelineRef, window metrics.Window) ([]metrics.RunRecord, error)

PipelineRuns implements metrics.Store.

func (*Store) PipelineSteps

func (s *Store) PipelineSteps(ctx context.Context, ref metrics.PipelineRef, window metrics.Window) ([]metrics.StepOccurrence, error)

PipelineSteps implements metrics.Store.

func (*Store) QuarantineStep added in v0.72.0

func (s *Store) QuarantineStep(ctx context.Context, key metrics.QuarantineKey, note string, now time.Time) (metrics.Quarantine, error)

QuarantineStep implements metrics.Store.

func (*Store) RepoUsage

func (s *Store) RepoUsage(ctx context.Context, repoID string, window metrics.Window) ([]metrics.UsageRecord, error)

RepoUsage implements metrics.Store. Each tracked pipeline within the repo contributes its own window's worth of runs, so a rarely run workflow isn't crowded out of the window by a busy one.

func (*Store) RunSteps added in v0.35.0

func (s *Store) RunSteps(ctx context.Context, runID string) ([]metrics.StepOccurrence, error)

RunSteps implements metrics.Store.

func (*Store) UnquarantineStep added in v0.72.0

func (s *Store) UnquarantineStep(ctx context.Context, key metrics.QuarantineKey) error

UnquarantineStep implements metrics.Store.

func (*Store) WindowBranches added in v0.70.0

func (s *Store) WindowBranches(ctx context.Context, filter metrics.RunWindowFilter) ([]metrics.BranchCount, error)

WindowBranches implements metrics.Store.

func (*Store) WindowRuns added in v0.53.0

func (s *Store) WindowRuns(ctx context.Context, filter metrics.RunWindowFilter) ([]metrics.WindowRun, error)

WindowRuns implements metrics.Store.

func (*Store) WindowSteps added in v0.54.0

func (s *Store) WindowSteps(ctx context.Context, filter metrics.RunWindowFilter) ([]metrics.WindowStep, error)

WindowSteps implements metrics.Store.

Jump to

Keyboard shortcuts

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