Documentation ¶
Index ¶
- type PgHA
- func NewFromConnection(managedConnection *connection.ConnectionPG) (*PgHA, error)
- func NewFromDBAAS(name, user, password, cluster string) (*PgHA, error)
- func NewFromHASQL(cluster *hasql.Cluster, dbName, user, password string, port int, ssl bool) *PgHA
- func NewFromHosts(dbName, user, password string, hosts []string, port int, ssl bool) (*PgHA, error)
- 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 NewFromHASQL ¶
func NewFromHosts ¶
func (*PgHA) ConnStringByHost ¶
func (*PgHA) MasterHost ¶
func (*PgHA) ReplicaHost ¶
Click to show internal directories.
Click to hide internal directories.