postgres

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package postgres registers Chronos's Postgres storage backend so an external consumer can build a durable engine with embed.New(embed.WithStorage("postgres://…")).

The provider implementation lives under internal/store and cannot be imported from outside the Chronos module (Go's internal-package rule). Blank-import this package to register it, exactly like a database/sql driver:

import (
	"github.com/felixgeelhaar/chronos/embed"
	_ "github.com/felixgeelhaar/chronos/storage/postgres"
)

eng, err := embed.New(embed.WithStorage("postgres://HOST/DB?namespace=chronos"))

Registering also pulls in the pgx driver, so only consumers that want Postgres pay for it — memory-only consumers stay dependency-light.

Jump to

Keyboard shortcuts

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