Documentation
¶
Index ¶
- func CheckAndCreateReplConn(session *types.Session) error
- func CreateConfig(dbName, pgUser, pgPass, pgHost string, pgPort int)
- func Init(session *types.Session) error
- func LRListenAck(session *types.Session, wsErr chan<- error)
- func LRStream(session *types.Session)
- func SnapshotData(session *types.Session, requestParams *types.SnapshotDataJSON) ([]map[string]interface{}, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckAndCreateReplConn ¶
CheckAndCreateReplConn creates a new replication connection
func CreateConfig ¶
Initialize the database configuration
func Init ¶
Init function - creates a db connection - creates a replication connection - delete existing replication slots - creates a new replication slot - gets the consistent point LSN and snapshot name - populates the Session object
func LRListenAck ¶
LRListenAck listens on the websocket for ack messages The commited LSN is extracted and is updated to the server
func LRStream ¶
LRStream will start streaming changes from the given slotName over the websocket connection
func SnapshotData ¶
func SnapshotData(session *types.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 ¶
This section is empty.