postgres

package
v0.23.1 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package postgres provides the inspectable PostgreSQL schedule store.

Index

Constants

View Source
const DropSchema = `DROP TABLE IF EXISTS goforge_schedules;`

DropSchema is intended for isolated integration-test cleanup.

View Source
const Schema = `` /* 2261-byte string literal not displayed */

Schema is the default plain SQL schema for durable recurring schedules. Applications should install it through an ordinary migration.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(*config) error

Option configures validated PostgreSQL identifiers.

func WithTable

func WithTable(table string) Option

WithTable selects an application-owned schedule table name.

type Store

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

Store owns schedule operations but not the supplied database handle.

func New

func New(db *sql.DB, options ...Option) (*Store, error)

New creates a PostgreSQL schedule store. The caller retains database ownership.

func (*Store) List

func (store *Store) List(ctx context.Context, definitions []schedule.Definition) ([]schedule.Status, error)

List reports only the supplied code-owned definitions. It never initializes state and never activates durable rows absent from the supplied registry.

func (*Store) Materialize

func (store *Store) Materialize(ctx context.Context, definition schedule.Definition, materialize schedule.MaterializeFunc) (schedule.Result, error)

Materialize initializes and evaluates one code-owned definition. Dispatch and cursor advancement occur in the same database transaction.

Jump to

Keyboard shortcuts

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