Documentation ¶
Index ¶
- type PgHA
- func (pg *PgHA) Close() error
- func (pg *PgHA) Conn(role dbaas.Role) (*pgx.Conn, error)
- func (pg *PgHA) ConnConfig(role dbaas.Role) (*pgx.ConnConfig, error)
- func (pg *PgHA) ConnString(role dbaas.Role) (string, error)
- func (pg *PgHA) ConnStringByHost(host string) string
- func (pg *PgHA) MasterHost() (*string, error)
- func (pg *PgHA) Pool(role dbaas.Role) (*pgxpool.Pool, error)
- func (pg *PgHA) PoolExec(ctx context.Context, role dbaas.Role, f func(*pgxpool.Conn) error) error
- func (pg *PgHA) PoolSize() int64
- func (pg *PgHA) ReplicaHost() (*string, error)
- func (pg *PgHA) Sqlx(role dbaas.Role) (*sqlx.DB, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PgHA ¶
type PgHA struct {
// contains filtered or unexported fields
}
func NewFromConnection ¶
func NewFromConnection(managedConnection *connection.ConnectionPG) (*PgHA, error)
func NewFromDBAAS ¶
func NewFromHosts ¶
func (*PgHA) ConnStringByHost ¶
func (*PgHA) MasterHost ¶
func (*PgHA) ReplicaHost ¶
Click to show internal directories.
Click to hide internal directories.