postgres

package
v2.13.1 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConnectToDb

func ConnectToDb(cfg config.PostgresStoreConfig) (*sql.DB, error)

func ConnectToDbPgx

func ConnectToDbPgx(postgresStoreConfig config.PostgresStoreConfig, customizers ...pgx_config.PgxConfigCustomization) (*pgxpool.Pool, error)

Types

type Listener

type Listener interface {
	Notify() chan *Notification
	Error() <-chan error
	Close() error
}

func NewPgxListener

func NewPgxListener(config postgres.PostgresStoreConfig, logger logr.Logger) (Listener, error)

NewPgxListener will create and initialize a PgxListener which will automatically connect and listen to the provided channel.

type Notification

type Notification struct {
	// Payload, or the empty string if unspecified.
	Payload string
}

Notification represents a single notification from the database.

type PgxListener

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

PgxListener will listen for NOTIFY commands on a channel.

func (*PgxListener) Close

func (l *PgxListener) Close() error

func (*PgxListener) Error

func (l *PgxListener) Error() <-chan error

func (*PgxListener) Notify

func (l *PgxListener) Notify() chan *Notification

Jump to

Keyboard shortcuts

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