Skip to content

Commit

Permalink
Remove hosts from pgha
Browse files Browse the repository at this point in the history
Убрал поле hosts из структуры pgha — похоже, оно не использовалось и только мешало
commit_hash:c45413706b5b6c08e3415aae241d9a93405f7d1a
  • Loading branch information
ovandriyanov committed Sep 25, 2024
1 parent 5d3f628 commit 8170b18
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions pkg/pgha/pg.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ type PgHA struct {
user string
password string
dbName string
hosts []string
cluster *hasql.Cluster
port int
ssl bool
Expand All @@ -44,10 +43,6 @@ func (pg *PgHA) Close() error {
return err
}

func (pg *PgHA) Hosts() ([]string, error) {
return pg.hosts, nil
}

func (pg *PgHA) hostByRole(role dbaas.Role) (*string, error) {
var node hasql.Node
// Create cluster handler
Expand Down Expand Up @@ -180,10 +175,6 @@ func (pg *PgHA) Conn(role dbaas.Role) (*pgx.Conn, error) {
return conn, nil
}

func (pg *PgHA) Clone() (*PgHA, error) {
return NewFromHosts(pg.dbName, pg.user, pg.password, pg.hosts, pg.port, pg.ssl)
}

func (pg *PgHA) PoolSize() int64 {
return pg.poolSize
}
Expand Down Expand Up @@ -261,7 +252,6 @@ func NewFromHosts(dbName, user, password string, hosts []string, port int, ssl b
user: user,
password: password,
dbName: dbName,
hosts: hosts,
cluster: c,
port: port,
ssl: ssl,
Expand Down

0 comments on commit 8170b18

Please sign in to comment.