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 ¶
- type Store
- func (s *Store) ListPipelines(ctx context.Context, filter metrics.PipelineListFilter) ([]metrics.PipelineRef, bool, error)
- func (s *Store) ListRuns(ctx context.Context, filter metrics.RunListFilter) ([]metrics.RunEntry, bool, error)
- func (s *Store) PipelineRuns(ctx context.Context, ref metrics.PipelineRef, window metrics.Window) ([]metrics.RunRecord, error)
- func (s *Store) PipelineSteps(ctx context.Context, ref metrics.PipelineRef, window metrics.Window) ([]metrics.StepOccurrence, error)
- func (s *Store) RepoUsage(ctx context.Context, repoID string, window metrics.Window) ([]metrics.UsageRecord, error)
- func (s *Store) RunSteps(ctx context.Context, runID string) ([]metrics.StepOccurrence, error)
- func (s *Store) WindowBranches(ctx context.Context, filter metrics.RunWindowFilter) ([]metrics.BranchCount, error)
- func (s *Store) WindowRuns(ctx context.Context, filter metrics.RunWindowFilter) ([]metrics.WindowRun, error)
- func (s *Store) WindowSteps(ctx context.Context, filter metrics.RunWindowFilter) ([]metrics.WindowStep, error)
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 (*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) 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) 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.