replicationcontext

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: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ReplicationContext

type ReplicationContext interface {
	StartReplicationContext() error
	StopReplicationContext() error
	NewReplicationChannelConnection(
		ctx context.Context,
	) (*pgconn.PgConn, error)

	Offset() (*statestorage.Offset, error)
	SetLastTransactionId(
		xid uint32,
	)
	LastTransactionId() uint32
	SetLastBeginLSN(
		lsn pgtypes.LSN,
	)
	LastBeginLSN() pgtypes.LSN
	SetLastCommitLSN(
		lsn pgtypes.LSN,
	)
	LastCommitLSN() pgtypes.LSN
	AcknowledgeReceived(
		xld pgtypes.XLogData,
	)
	LastReceivedLSN() pgtypes.LSN
	AcknowledgeProcessed(
		xld pgtypes.XLogData, processedLSN *pgtypes.LSN,
	) error
	LastProcessedLSN() pgtypes.LSN
	SetPositionLSNs(
		receivedLSN, processedLSN pgtypes.LSN,
	)

	InitialSnapshotMode() spiconfig.InitialSnapshotMode
	DatabaseUsername() string
	ReplicationSlotName() string
	ReplicationSlotCreate() bool
	ReplicationSlotAutoDrop() bool
	WALLevel() string
	SystemId() string
	Timeline() int32
	DatabaseName() string

	PostgresVersion() version.PostgresVersion
	TimescaleVersion() version.TimescaleVersion
	IsMinimumPostgresVersion() bool
	IsPG14GE() bool
	IsMinimumTimescaleVersion() bool
	IsTSDB212GE() bool
	IsLogicalReplicationEnabled() bool
	IsDecompressionMarkingEnabled() bool

	ExistsReplicationSlot(
		slotName string,
	) (found bool, err error)
	ReadReplicationSlot(
		slotName string,
	) (pluginName, slotType string, restartLsn, confirmedFlushLsn pgtypes.LSN, err error)
}

Jump to

Keyboard shortcuts

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