postgres

package module
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package postgres is the networked PostgreSQL store driver. Since ADR-0019 S1 it is a THIN DRIVER over the queue/v4-backed adapter (internal/queue/postgresv4): the hand-rolled engine is retired and the upstream go-cqrs-lite queue engine owns the task/fact semantics, with token-fenced finalizes (upstream ADR-0134) replacing the legacy owner-string fence. The tq Store contract is unchanged for callers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Store

type Store = v4.Store

Store is the concrete PostgreSQL store; it satisfies the sibling queue facade's Store interface through shared type aliases (ADR-0016).

func Open

func Open(ctx context.Context, dsn string, _ int32) (*Store, error)

Open connects to dsn (e.g. "postgres://user:pass@host:5432/db") and returns a ready store. The maxConns parameter is retained for call-site compatibility and ignored: the v4-backed store manages its own two handles (one engine write lane, one bounded companion pool).

func OpenWithPool added in v0.3.0

func OpenWithPool(ctx context.Context, pool *pgxpool.Pool, opts ...StoreOption) (*Store, error)

OpenWithPool wraps a caller-owned pool into a ready store, applying the schema on it. The caller keeps pool ownership; consumers with an existing pool pass THEIR pool in instead of opening a second one.

type StoreOption added in v0.3.1

type StoreOption = v4.StoreOption

StoreOption configures optional Store behavior.

Jump to

Keyboard shortcuts

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