Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Option ¶
Option defines the functional option pattern for configuring Postgres.
func WithConnAttempts ¶
WithConnAttempts sets the number of connection attempts.
func WithConnTimeout ¶
WithConnTimeout sets the connection timeout.
func WithMaxPoolSize ¶
WithMaxPoolSize sets the maximum pool size.
type Postgres ¶
type Postgres struct { // Use Pool for better performance if there are no transactions. Pool *pgxpool.Pool // Use TrManager to work with transactions. TrManager *manager.Manager // contains filtered or unexported fields }
Postgres represents a Postgres instance with pool and transaction manager.
Click to show internal directories.
Click to hide internal directories.