postgres

package
v0.12.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: 11 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package postgres holds operational history in Postgres (§2.9): the production store, reached through AGENTIC_KIT_ADMIN_DATABASE_URL. Point it at its own database or the one you already have; the agentic_ prefix keeps them apart. The schema is the TypeScript package's.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Connect

func Connect(ctx context.Context, db *sql.DB) (ports.AdminStore, error)

Connect returns the store with its schema migration already running behind it (§2.9).

The returned store waits for that migration before its first call, so a caller never sees a half-built schema — but SetupAgentCore is not held up by it. Connecting is still synchronous: a URL that cannot be reached is a configuration problem worth failing on at startup.

Several workers starting at once is expected and safe: each migration runs under a transaction-scoped advisory lock, so they queue rather than race.

func ConnectWithLogger

func ConnectWithLogger(ctx context.Context, db *sql.DB, log *slog.Logger) (ports.AdminStore, error)

ConnectWithLogger is Connect with somewhere to report a migration that failed.

func Open

func Open(url string) (*sql.DB, error)

Open opens a Postgres connection with whichever database/sql driver the process has registered: "pgx" (github.com/jackc/pgx/v5/stdlib) or "postgres" (github.com/lib/pq).

Types

type Store

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

Store is an AdminStore over Postgres.

func (*Store) Close

func (s *Store) Close() error

func (*Store) Runs

func (s *Store) Runs() ports.RunStore

func (*Store) Steps

func (s *Store) Steps() ports.StepStore

func (*Store) Threads

func (s *Store) Threads() ports.AdminThreadStore

Jump to

Keyboard shortcuts

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