Documentation
¶
Index ¶
- func ConfigurePGXLogger(connConfig *pgx.ConnConfig)
- func ConvertToWriteConstraintError(livingTupleConstraint string, err error) error
- func NewPGXExecutor(txSource TxFactory) common.ExecuteQueryFunc
- func NewPgxpoolStatsCollector(dbpool *pgxpool.Pool, dbName string) prometheus.Collector
- type TxFactory
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConfigurePGXLogger ¶
func ConfigurePGXLogger(connConfig *pgx.ConnConfig)
ConfigurePGXLogger sets zerolog global logger into the connection pool configuration, and maps info level events to debug, as they are rather verbose for SpiceDB's info level
func ConvertToWriteConstraintError ¶
ConvertToWriteConstraintError converts the given Postgres error into a CreateRelationshipExistsError if applicable. If not applicable, returns nils.
func NewPGXExecutor ¶
func NewPGXExecutor(txSource TxFactory) common.ExecuteQueryFunc
NewPGXExecutor creates an executor that uses the pgx library to make the specified queries.
func NewPgxpoolStatsCollector ¶
func NewPgxpoolStatsCollector(dbpool *pgxpool.Pool, dbName string) prometheus.Collector
NewPgxpoolStatsCollector returns a collector that exports stats available in a pgxpool.
For more info see: https://pkg.go.dev/github.com/jackc/pgx/v4/pgxpool#Stat
Types ¶
Click to show internal directories.
Click to hide internal directories.