config

package
v1.4.1-beta Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2025 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Overview

Package config provides PostgreSQL database configuration for EventStore testing.

This package contains factory functions for creating database connections using EventStore's supported PostgreSQL adapters (pgx.Pool, sql.DB, sqlx.DB) with pre-configured test and benchmark database DSNs.

The configurations support both single-node and primary/replica setups for testing EventStore's PostgreSQL implementation under different database topologies and adapter types.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PostgresPGXPoolPrimaryConfig

func PostgresPGXPoolPrimaryConfig() *pgxpool.Config

PostgresPGXPoolPrimaryConfig creates a pgxpool.Config for the primary node of a replicated database.

func PostgresPGXPoolReplicaConfig

func PostgresPGXPoolReplicaConfig() *pgxpool.Config

PostgresPGXPoolReplicaConfig creates a pgxpool.Config for the replica node of a replicated database.

func PostgresPGXPoolSingleConfig

func PostgresPGXPoolSingleConfig() *pgxpool.Config

PostgresPGXPoolSingleConfig creates a pgxpool.Config for a single database.

func PostgresPrimaryDSN

func PostgresPrimaryDSN() string

PostgresPrimaryDSN returns the DSN for the primary benchmark database.

func PostgresReplicaDSN

func PostgresReplicaDSN() string

PostgresReplicaDSN returns the DSN for the replica benchmark database.

func PostgresSQLDBPrimaryConfig

func PostgresSQLDBPrimaryConfig() *sql.DB

PostgresSQLDBPrimaryConfig creates a configured *sql.DB for the primary node of a replicated database.

func PostgresSQLDBReplicaConfig

func PostgresSQLDBReplicaConfig() *sql.DB

PostgresSQLDBReplicaConfig creates a configured *sql.DB for the replica node of a replicated database.

func PostgresSQLDBSingleConfig

func PostgresSQLDBSingleConfig() *sql.DB

PostgresSQLDBSingleConfig creates a configured *sql.DB for a single database.

func PostgresSQLXPrimaryConfig

func PostgresSQLXPrimaryConfig() *sqlx.DB

PostgresSQLXPrimaryConfig creates a configured *sqlx.DB for the primary node of a replicated database.

func PostgresSQLXReplicaConfig

func PostgresSQLXReplicaConfig() *sqlx.DB

PostgresSQLXReplicaConfig creates a configured *sqlx.DB for the replica node of a replicated database.

func PostgresSQLXSingleConfig

func PostgresSQLXSingleConfig() *sqlx.DB

PostgresSQLXSingleConfig creates a configured *sqlx.DB for a single database.

func PostgresSingleDSN

func PostgresSingleDSN() string

PostgresSingleDSN returns the DSN for the test database.

Types

This section is empty.

Jump to

Keyboard shortcuts

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