postgres

package
v0.0.0-...-b8d96e6 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2026 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Connect

func Connect(ctx context.Context, dsn string, opts ...ConnectOption) (*pgxpool.Pool, error)

Connect establishes a connection pool to the PostgreSQL database using the provided DSN and options.

func NewProvider

func NewProvider(db *sql.DB, opts ...ProviderOption) scrapemate.JobProvider

func NewResultWriter

func NewResultWriter(db *sql.DB) scrapemate.ResultWriter

Types

type ConnectOption

type ConnectOption func(*ConnectOptions)

func WithMaxConnIdleTime

func WithMaxConnIdleTime(d time.Duration) ConnectOption

func WithMaxConnLifetime

func WithMaxConnLifetime(d time.Duration) ConnectOption

func WithMaxConns

func WithMaxConns(n int32) ConnectOption

func WithMinConns

func WithMinConns(n int32) ConnectOption

func WithPingTimeout

func WithPingTimeout(d time.Duration) ConnectOption

type ConnectOptions

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

type ProviderOption

type ProviderOption func(*provider)

ProviderOption allows configuring the provider

func WithBatchSize

func WithBatchSize(size int) ProviderOption

WithBatchSize sets custom batch size

Jump to

Keyboard shortcuts

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