Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SwitchSlave ¶
func SwitchSlave(executor sqlx.DBExecutor) sqlx.DBExecutor
Types ¶
type CanSlave ¶
type CanSlave interface {
UseSlave() sqlx.DBExecutor
}
type Postgres ¶
type Postgres struct { Host string SlaveHost string Port int User string Password envconfig.Password Extra string Extensions []string PoolSize int ConnMaxLifetime envconfig.Duration Database *sqlx.Database `ignored:"true"` *sqlx.DB `ignored:"true"` // contains filtered or unexported fields }
func (*Postgres) LivenessCheck ¶
func (*Postgres) SetDefaults ¶
func (m *Postgres) SetDefaults()
func (*Postgres) UseSlave ¶
func (m *Postgres) UseSlave() sqlx.DBExecutor
type PostgresEndpoint ¶
type PostgresEndpoint struct { Endpoint envconfig.Endpoint `env:""` Database *sqlx.Database `env:"-"` Extensions []string PoolSize int ConnMaxLifetime envconfig.Duration *sqlx.DB `env:"-"` }
func (*PostgresEndpoint) Init ¶
func (m *PostgresEndpoint) Init()
func (*PostgresEndpoint) LivenessCheck ¶
func (m *PostgresEndpoint) LivenessCheck() map[string]string
func (*PostgresEndpoint) SetDefaults ¶
func (m *PostgresEndpoint) SetDefaults()
Click to show internal directories.
Click to hide internal directories.