Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DB ¶
func MustConnect ¶
Tries to establish connection with database using given Connection URI and returns a wrapped sqlx.DB structure with few more fields. If it doesn't succeed to connect then it causes to exit with code 1.
func (*DB) CurrentWalLsn ¶
Returns the current write-ahead log write location as a string. When no replication exists it will return an error.
func (*DB) Publications ¶
func (db *DB) Publications() ([]Publication, error)
Returns a list of postgres publications that already have replication slot created, i.e. there is a subscription on standby instance side.
func (*DB) ReplicationSlots ¶
func (db *DB) ReplicationSlots() ([]ReplicationSlot, error)
Returns a list of postgres replication slots.
func (*DB) Subscriptions ¶
func (db *DB) Subscriptions() ([]Subscription, error)
Returns a list of postgres subscriptions.
type Publication ¶
type ReplicationSlot ¶
type Subscription ¶
Click to show internal directories.
Click to hide internal directories.