postgres

package
v2.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package postgres provides postgres utilities.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RunsRepo

type RunsRepo struct {
	Pool ports.DatabasePool
}

RunsRepo stores scheduler job executions.

func NewRunsRepo

func NewRunsRepo(pool ports.DatabasePool) *RunsRepo

NewRunsRepo creates a runs repository backed by Postgres.

func (*RunsRepo) LastFinished

func (r *RunsRepo) LastFinished(ctx context.Context, jobName string) (time.Time, bool, error)

LastFinished returns the most recent finished timestamp for a job.

func (*RunsRepo) Record

func (r *RunsRepo) Record(ctx context.Context, jobName string, startedAt, finishedAt time.Time, success bool, errMsg string) error

Record stores a completed job run.

Jump to

Keyboard shortcuts

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