2
0

Restructure connect process

- Moved lots of connection logic to pgconn from pgx
- Extracted pgpassfile package
This commit is contained in:
Jack Christensen
2018-12-30 16:53:57 -06:00
parent 9990e4894d
commit b3c8a73dc7
19 changed files with 1134 additions and 1576 deletions
+5 -5
View File
@@ -158,13 +158,13 @@ func NewStandbyStatus(walPositions ...uint64) (status *StandbyStatus, err error)
return
}
func ReplicationConnect(config ConnConfig) (r *ReplicationConn, err error) {
if config.RuntimeParams == nil {
config.RuntimeParams = make(map[string]string)
func ReplicationConnect(config *ConnConfig) (r *ReplicationConn, err error) {
if config.Config.RuntimeParams == nil {
config.Config.RuntimeParams = make(map[string]string)
}
config.RuntimeParams["replication"] = "database"
config.Config.RuntimeParams["replication"] = "database"
c, err := Connect(config)
c, err := ConnectConfig(context.TODO(), config)
if err != nil {
return
}