db

package
v0.1.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 13, 2018 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckAndCreateReplConn

func CheckAndCreateReplConn(session *types.Session) error

CheckAndCreateReplConn creates a new replication connection

func CreateConfig

func CreateConfig(dbName, pgUser, pgPass, pgHost string, pgPort int)

Initialize the database configuration

func Init

func Init(session *types.Session) error

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

func LRListenAck(session *types.Session, wsErr chan<- error)

LRListenAck listens on the websocket for ack messages The commited LSN is extracted and is updated to the server

func LRStream

func LRStream(session *types.Session)

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL