postgres

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2021 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Index

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

type RelationTupleRow

type RelationTupleRow struct {
	Namespace        string
	ObjectID         string
	Relation         string
	UsersetNamespace string
	UsersetObjectID  string
	UsersetRelation  string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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