postgres

package
v1.10.2 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Connect added in v1.10.2

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 added in v1.10.2

type ConnectOption func(*ConnectOptions)

func WithMaxConnIdleTime added in v1.10.2

func WithMaxConnIdleTime(d time.Duration) ConnectOption

func WithMaxConnLifetime added in v1.10.2

func WithMaxConnLifetime(d time.Duration) ConnectOption

func WithMaxConns added in v1.10.2

func WithMaxConns(n int32) ConnectOption

func WithMinConns added in v1.10.2

func WithMinConns(n int32) ConnectOption

func WithPingTimeout added in v1.10.2

func WithPingTimeout(d time.Duration) ConnectOption

type ConnectOptions added in v1.10.2

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

type ProviderOption added in v1.7.7

type ProviderOption func(*provider)

ProviderOption allows configuring the provider

func WithBatchSize added in v1.7.7

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