Documentation
¶
Index ¶
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.
Types ¶
type PoolOptions ¶ added in v1.18.0
type PoolOptions struct { ConnMaxIdleTime *time.Duration ConnMaxLifetime *time.Duration ConnHealthCheckInterval *time.Duration MinOpenConns *int MaxOpenConns *int }
PoolOptions is the set of configuration used for a pgx connection pool.
func (PoolOptions) ConfigurePgx ¶ added in v1.18.0
func (opts PoolOptions) ConfigurePgx(pgxConfig *pgxpool.Config)
ConfigurePgx applies PoolOptions to a pgx connection pool confiugration.
Click to show internal directories.
Click to hide internal directories.