postgres

package module
v0.6.0 Latest Latest
Warning

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

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

Documentation

Overview

Package postgres provides a Postgres-backed process.TimeoutStore. See ADR-0043.

Index

Constants

This section is empty.

Variables

View Source
var Schema string

Functions

func Migrate

func Migrate(ctx context.Context, pool *pgxpool.Pool) error

Migrate applies Schema to pool. Idempotent.

Types

type Option

type Option func(*options)

Option configures New.

func WithoutMigrate

func WithoutMigrate() Option

WithoutMigrate disables the automatic schema migration.

type Store

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

Store is a Postgres-backed process.TimeoutStore.

func New

func New(ctx context.Context, pool *pgxpool.Pool, opts ...Option) (*Store, error)

New returns a Store wrapping pool.

func (*Store) Cancel

func (s *Store) Cancel(ctx context.Context, id string) error

Cancel implements process.TimeoutStore.

func (*Store) Due

func (s *Store) Due(ctx context.Context, now time.Time) iter.Seq2[process.Timeout, error]

Due implements process.TimeoutStore.

func (*Store) Remove

func (s *Store) Remove(ctx context.Context, id string) error

Remove implements process.TimeoutStore.

func (*Store) Schedule

func (s *Store) Schedule(ctx context.Context, t process.Timeout) (process.Timeout, error)

Schedule implements process.TimeoutStore.

Jump to

Keyboard shortcuts

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