Documentation ¶
Index ¶
Constants ¶
View Source
const DefaultSlotName = "lode_main"
View Source
const StandbyStatusInterval = 10 * time.Second
Variables ¶
This section is empty.
Functions ¶
func StreamChanges ¶
func StreamChanges( logger *logrus.Logger, ctx context.Context, replConn *pgx.ReplicationConn, slotName string, state *State, onMessage func(*parser.Wal2JsonMessage) error, ) error
Starts streaming changes on given replication slot using replication connection Takes in cancellable context that will stop the streaming process when cancelled Takes in onMessage handler function that will process WalMessages received by the streaming process and optionally return an error to stop streaming when an unexpected event happens
Types ¶
type WALPayload ¶
type WALPayload struct {
NextLSN string `json:"nextlsn"`
}
Click to show internal directories.
Click to hide internal directories.