Documentation ¶
Index ¶
- func NewPgxpoolStatsCollector(dbpool *pgxpool.Pool, dbName string) prometheus.Collector
- func NewPostgresDatastore(url string, options ...PostgresOption) (datastore.Datastore, error)
- type PostgresOption
- func ConnMaxIdleTime(idle time.Duration) PostgresOption
- func ConnMaxLifetime(lifetime time.Duration) PostgresOption
- func EnablePrometheusStats() PostgresOption
- func EnableTracing() PostgresOption
- func GCWindow(window time.Duration) PostgresOption
- func HealthCheckPeriod(period time.Duration) PostgresOption
- func MaxOpenConns(conns int) PostgresOption
- func MinOpenConns(conns int) PostgresOption
- func RevisionFuzzingTimedelta(delta time.Duration) PostgresOption
- func SplitAtEstimatedQuerySize(splitAtEstimatedQuerySize units.Base2Bytes) PostgresOption
- func WatchBufferLength(watchBufferLength uint16) PostgresOption
- type RelationTupleRow
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewPgxpoolStatsCollector ¶
func NewPgxpoolStatsCollector(dbpool *pgxpool.Pool, dbName string) prometheus.Collector
Returns a collector that exports stats available in pgxpool https://pkg.go.dev/github.com/jackc/pgx/v4/pgxpool#Stat
func NewPostgresDatastore ¶
func NewPostgresDatastore( url string, options ...PostgresOption, ) (datastore.Datastore, error)
Types ¶
type PostgresOption ¶
type PostgresOption func(*postgresOptions)
func ConnMaxIdleTime ¶
func ConnMaxIdleTime(idle time.Duration) PostgresOption
func ConnMaxLifetime ¶
func ConnMaxLifetime(lifetime time.Duration) PostgresOption
func EnablePrometheusStats ¶
func EnablePrometheusStats() PostgresOption
func EnableTracing ¶
func EnableTracing() PostgresOption
func GCWindow ¶
func GCWindow(window time.Duration) PostgresOption
func HealthCheckPeriod ¶
func HealthCheckPeriod(period time.Duration) PostgresOption
func MaxOpenConns ¶
func MaxOpenConns(conns int) PostgresOption
func MinOpenConns ¶
func MinOpenConns(conns int) PostgresOption
func RevisionFuzzingTimedelta ¶
func RevisionFuzzingTimedelta(delta time.Duration) PostgresOption
func SplitAtEstimatedQuerySize ¶
func SplitAtEstimatedQuerySize(splitAtEstimatedQuerySize units.Base2Bytes) PostgresOption
func WatchBufferLength ¶
func WatchBufferLength(watchBufferLength uint16) PostgresOption
Source Files ¶
Click to show internal directories.
Click to hide internal directories.