postgres

package
v0.3.1 Latest Latest
Warning

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

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

Documentation

Overview

Package postgres provides the production PostgreSQL storage driver.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Host     string
	Username string
	Password string
	Name     string
	Port     int
	Timezone string
	// MaxOpenConns defaults to 25. A positive value must be at least 2 because
	// the maintenance leader pins one pooled connection while running queries on
	// another.
	MaxOpenConns    int
	MaxIdleConns    int
	ConnMaxLifetime time.Duration
	ConnMaxIdleTime time.Duration
	SSLMode         string
	Durability      store.Durability
}

type Driver

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

func Open

func Open(config Config) (*Driver, error)

func (*Driver) Close

func (driver *Driver) Close() error

func (*Driver) DB

func (driver *Driver) DB() *sql.DB

func (*Driver) Dialect

func (driver *Driver) Dialect() store.Dialect

func (*Driver) DriverName

func (driver *Driver) DriverName() string

func (*Driver) Listen

func (driver *Driver) Listen(ctx context.Context, channel string) (<-chan string, error)

func (*Driver) NotificationHealthy added in v0.3.0

func (driver *Driver) NotificationHealthy() bool

Jump to

Keyboard shortcuts

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