postgres

package
v0.0.0-...-4803491 Latest Latest
Warning

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

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

Documentation

Overview

Package postgres opens the application pool and applies the embedded migrations, following the startup sequence of instance-config §6.1.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Connect

func Connect(ctx context.Context, dsn string, logger *slog.Logger) (*pgxpool.Pool, error)

Connect opens a pgx pool, retrying with backoff for at most 30 seconds.

func Migrate

func Migrate(ctx context.Context, dsn string, logger *slog.Logger) error

Migrate applies the embedded goose migrations, before any network listen (§6.1 step 3). Each migration runs in its own transaction; a failure stops the process with the database left at the last complete migration.

Types

This section is empty.

Jump to

Keyboard shortcuts

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