Documentation
¶
Index ¶
Constants ¶
View Source
const ( ReplicationSlotTempl = "" /* 131-byte string literal not displayed */ AdvanceLSNTemplate = "SELECT * FROM pg_replication_slot_advance('%s', '%s')" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChangeFilter ¶
type ChangeFilter struct {
// contains filtered or unexported fields
}
func NewChangeFilter ¶
func NewChangeFilter(typeConverter func(value interface{}, columnType string) (interface{}, error), streams ...types.StreamInterface) ChangeFilter
func (ChangeFilter) FilterChange ¶
type ReplicationSlot ¶
type Socket ¶
type Socket struct {
// clientXLogPos tracks the current position in the Write-Ahead Log (WAL)
ClientXLogPos pglogrepl.LSN
// confirmedLSN is the position from which replication should start (Prev marked lsn)
ConfirmedFlushLSN pglogrepl.LSN
// wal position at a point of time
CurrentWalPosition pglogrepl.LSN
// contains filtered or unexported fields
}
Socket represents a connection to PostgreSQL's logical replication stream
func NewConnection ¶
func (*Socket) AcknowledgeLSN ¶
Confirm that Logs has been recorded
func (*Socket) AdvanceLSN ¶ added in v0.1.5
advanceLSN advances the logical replication position to the current WAL position.
type WALMessage ¶
type WALMessage struct {
NextLSN string `json:"nextlsn"`
Timestamp typeutils.Time `json:"timestamp"`
Change []struct {
Kind string `json:"kind"`
Schema string `json:"schema"`
Table string `json:"table"`
Columnnames []string `json:"columnnames"`
Columntypes []string `json:"columntypes"`
Columnvalues []interface{} `json:"columnvalues"`
Oldkeys struct {
Keynames []string `json:"keynames"`
Keytypes []string `json:"keytypes"`
Keyvalues []interface{} `json:"keyvalues"`
} `json:"oldkeys"`
} `json:"change"`
}
Click to show internal directories.
Click to hide internal directories.