postgres

package
v0.0.0-...-3495602 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(*Postgres)

Option -.

func ConnAttempts

func ConnAttempts(attempts int32) Option

ConnAttempts -.

func ConnTimeout

func ConnTimeout(timeout time.Duration) Option

ConnTimeout -.

func MaxPoolSize

func MaxPoolSize(size int32) Option

MaxPoolSize -.

type Postgres

type Postgres struct {
	DB *pgxpool.Pool
	// contains filtered or unexported fields
}

func New

func New(ctx context.Context, dbURL string, log *slog.Logger, opts ...Option) (*Postgres, error)

func (*Postgres) Close

func (p *Postgres) Close(ctx context.Context)

Jump to

Keyboard shortcuts

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