eventhandlers

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseReplicationEventHandler

type BaseReplicationEventHandler interface {
	OnRelationEvent(
		xld pgtypes.XLogData, msg *pgtypes.RelationMessage,
	) error
}

type CompressionReplicationEventHandler

type CompressionReplicationEventHandler interface {
	BaseReplicationEventHandler
	OnChunkCompressedEvent(
		xld pgtypes.XLogData, hypertable *systemcatalog.Hypertable, chunk *systemcatalog.Chunk,
	) error
	OnChunkDecompressedEvent(
		xld pgtypes.XLogData, hypertable *systemcatalog.Hypertable, chunk *systemcatalog.Chunk,
	) error
}

type LogicalReplicationEventHandler

type LogicalReplicationEventHandler interface {
	BaseReplicationEventHandler
	OnBeginEvent(
		xld pgtypes.XLogData, msg *pgtypes.BeginMessage,
	) error
	OnCommitEvent(
		xld pgtypes.XLogData, msg *pgtypes.CommitMessage,
	) error
	OnInsertEvent(
		xld pgtypes.XLogData, msg *pgtypes.InsertMessage,
	) error
	OnUpdateEvent(
		xld pgtypes.XLogData, msg *pgtypes.UpdateMessage,
	) error
	OnDeleteEvent(
		xld pgtypes.XLogData, msg *pgtypes.DeleteMessage,
	) error
	OnTruncateEvent(
		xld pgtypes.XLogData, msg *pgtypes.TruncateMessage,
	) error
	OnTypeEvent(
		xld pgtypes.XLogData, msg *pgtypes.TypeMessage,
	) error
	OnOriginEvent(
		xld pgtypes.XLogData, msg *pgtypes.OriginMessage,
	) error
	OnMessageEvent(
		xld pgtypes.XLogData, msg *pgtypes.LogicalReplicationMessage,
	) error
}

type RecordReplicationEventHandler added in v0.10.0

type RecordReplicationEventHandler interface {
	BaseReplicationEventHandler
	OnReadEvent(
		lsn pgtypes.LSN, table schema.TableAlike,
		chunk *systemcatalog.Chunk, newValues map[string]any,
	) error
	OnInsertEvent(
		xld pgtypes.XLogData, table schema.TableAlike,
		chunk *systemcatalog.Chunk, newValues map[string]any,
	) error
	OnUpdateEvent(
		xld pgtypes.XLogData, table schema.TableAlike,
		chunk *systemcatalog.Chunk, oldValues, newValues map[string]any,
	) error
	OnDeleteEvent(
		xld pgtypes.XLogData, table schema.TableAlike,
		chunk *systemcatalog.Chunk, oldValues map[string]any, tombstone bool,
	) error
	OnTruncateEvent(
		xld pgtypes.XLogData, table schema.TableAlike,
	) error
	OnBeginEvent(
		xld pgtypes.XLogData, msg *pgtypes.BeginMessage,
	) error
	OnCommitEvent(
		xld pgtypes.XLogData, msg *pgtypes.CommitMessage,
	) error
	OnTypeEvent(
		xld pgtypes.XLogData, msg *pgtypes.TypeMessage,
	) error
	OnOriginEvent(
		xld pgtypes.XLogData, msg *pgtypes.OriginMessage,
	) error
	OnMessageEvent(
		xld pgtypes.XLogData, msg *pgtypes.LogicalReplicationMessage,
	) error
	OnTransactionFinishedEvent(
		xld pgtypes.XLogData, msg *pgtypes.CommitMessage,
	) error
}

type SnapshottingEventHandler

type SnapshottingEventHandler interface {
	BaseReplicationEventHandler
	OnChunkSnapshotStartedEvent(
		hypertable *systemcatalog.Hypertable, chunk *systemcatalog.Chunk,
	) error
	OnChunkSnapshotFinishedEvent(
		hypertable *systemcatalog.Hypertable, chunk *systemcatalog.Chunk, snapshot pgtypes.LSN,
	) error
	OnTableSnapshotStartedEvent(
		snapshotName string, table systemcatalog.BaseTable,
	) error
	OnTableSnapshotFinishedEvent(
		snapshotName string, table systemcatalog.BaseTable, lsn pgtypes.LSN,
	) error
	OnSnapshottingStartedEvent(
		snapshotName string,
	) error
	OnSnapshottingFinishedEvent() error
}

type SystemCatalogReplicationEventHandler

type SystemCatalogReplicationEventHandler interface {
	BaseReplicationEventHandler
	OnHypertableAddedEvent(
		xld pgtypes.XLogData, relationId uint32, newValues map[string]any,
	) error
	OnHypertableUpdatedEvent(
		xld pgtypes.XLogData, relationId uint32, oldValues, newValues map[string]any,
	) error
	OnHypertableDeletedEvent(
		xld pgtypes.XLogData, relationId uint32, oldValues map[string]any,
	) error
	OnChunkAddedEvent(
		xld pgtypes.XLogData, relationId uint32, newValues map[string]any,
	) error
	OnChunkUpdatedEvent(
		xld pgtypes.XLogData, relationId uint32, oldValues, newValues map[string]any,
	) error
	OnChunkDeletedEvent(
		xld pgtypes.XLogData, relationId uint32, oldValues map[string]any,
	) error
}

Jump to

Keyboard shortcuts

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