db

package
v0.1.80 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package db owns the Postgres connection pool.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(ctx context.Context, cfg *config.Config) (*pgxpool.Pool, error)

New opens a pool and verifies it can actually serve a query. It returns only after a successful round trip, so callers never receive a pool that merely looks valid.

func NewRead added in v0.1.21

func NewRead(ctx context.Context, cfg *config.Config) (*pgxpool.Pool, error)

NewRead opens the API's read pool. DATABASE_READ_URL deliberately falls back to DATABASE_URL, allowing the application change to ship before replicas do.

Types

This section is empty.

Jump to

Keyboard shortcuts

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