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 ¶
- func PostgresPGXPoolPrimaryConfig() *pgxpool.Config
- func PostgresPGXPoolReplicaConfig() *pgxpool.Config
- func PostgresPGXPoolSingleConfig() *pgxpool.Config
- func PostgresPrimaryDSN() string
- func PostgresReplicaDSN() string
- func PostgresSQLDBPrimaryConfig() *sql.DB
- func PostgresSQLDBReplicaConfig() *sql.DB
- func PostgresSQLDBSingleConfig() *sql.DB
- func PostgresSQLXPrimaryConfig() *sqlx.DB
- func PostgresSQLXReplicaConfig() *sqlx.DB
- func PostgresSQLXSingleConfig() *sqlx.DB
- func PostgresSingleDSN() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PostgresPGXPoolPrimaryConfig ¶
PostgresPGXPoolPrimaryConfig creates a pgxpool.Config for the primary node of a replicated database.
func PostgresPGXPoolReplicaConfig ¶
PostgresPGXPoolReplicaConfig creates a pgxpool.Config for the replica node of a replicated database.
func PostgresPGXPoolSingleConfig ¶
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 ¶
PostgresSQLDBPrimaryConfig creates a configured *sql.DB for the primary node of a replicated database.
func PostgresSQLDBReplicaConfig ¶
PostgresSQLDBReplicaConfig creates a configured *sql.DB for the replica node of a replicated database.
func PostgresSQLDBSingleConfig ¶
PostgresSQLDBSingleConfig creates a configured *sql.DB for a single database.
func PostgresSQLXPrimaryConfig ¶
PostgresSQLXPrimaryConfig creates a configured *sqlx.DB for the primary node of a replicated database.
func PostgresSQLXReplicaConfig ¶
PostgresSQLXReplicaConfig creates a configured *sqlx.DB for the replica node of a replicated database.
func PostgresSQLXSingleConfig ¶
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.