Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SnapshotData ¶
func SnapshotData(session *Session, requestParams *types.SnapshotDataJSON) ([]map[string]interface{}, error)
SnapshotData queries the snapshot for data from the given table and returns the results as a JSON array
Types ¶
type Config ¶ added in v0.1.8
type Config struct { *pgx.ConnConfig SlotName string }
type Session ¶ added in v0.1.8
type Session struct { ReplConn *pgx.ReplicationConn PGConn *pgx.Conn Out chan types.Wal2JSONEvent SnapshotName string RestartLSN uint64 Logger logger.Logger // contains filtered or unexported fields }
Session stores the context, active db and ws connections, and replication slot state
func NewSession ¶ added in v0.1.8
func (*Session) AckLSN ¶ added in v0.1.8
LRAckLSN will set the flushed LSN value and trigger a StandbyStatus update
func (*Session) DeleteAllSlots ¶ added in v0.1.8
delete all old slots that were created by us
func (*Session) EnsureSlot ¶ added in v0.1.9
func (*Session) LRStream ¶ added in v0.1.8
LRStream will start streaming changes from the given slotName over the websocket connection
func (*Session) ReCreateReplConn ¶ added in v0.1.8
CheckAndCreateReplConn creates a new replication connection
Click to show internal directories.
Click to hide internal directories.