cdc

package
v1.0.0-rc.2 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CDCPayload

type CDCPayload struct {
	Before map[string]any `json:"before"`
	After  map[string]any `json:"after"`
	Op     string         `json:"op"` // c, u, d, r
	Source map[string]any `json:"source"`
	TS     int64          `json:"ts_ms"`
}

CDCPayload represents the structure of a change data capture event.

type Connector

type Connector interface {
	hermod.Source
	// Stream starts the CDC streaming from a specific checkpoint.
	Stream(ctx context.Context, checkpoint string) error
}

Connector defines the interface for Change Data Capture connectors.

type DB2Connector

type DB2Connector struct{}

DB2Connector implements CDC for IBM DB2 databases.

func NewDB2Connector

func NewDB2Connector() *DB2Connector

func (*DB2Connector) Ack

func (c *DB2Connector) Ack(ctx context.Context, msg hermod.Message) error

func (*DB2Connector) Close

func (c *DB2Connector) Close() error

func (*DB2Connector) Ping

func (c *DB2Connector) Ping(ctx context.Context) error

func (*DB2Connector) Read

func (c *DB2Connector) Read(ctx context.Context) (hermod.Message, error)

func (*DB2Connector) Stream

func (c *DB2Connector) Stream(ctx context.Context, checkpoint string) error

type OracleConnector

type OracleConnector struct{}

OracleConnector implements CDC for Oracle databases using LogMiner.

func NewOracleConnector

func NewOracleConnector() *OracleConnector

func (*OracleConnector) Ack

func (*OracleConnector) Close

func (c *OracleConnector) Close() error

func (*OracleConnector) Ping

func (c *OracleConnector) Ping(ctx context.Context) error

func (*OracleConnector) Read

func (*OracleConnector) Stream

func (c *OracleConnector) Stream(ctx context.Context, checkpoint string) error

type Source

type Source struct {
	Type   string
	Config map[string]any
}

Source represents a CDC source (e.g., Oracle LogMiner, IBM DB2).

func NewSource

func NewSource(sourceType string, config map[string]any) *Source

func (*Source) Ack

func (s *Source) Ack(ctx context.Context, msg hermod.Message) error

func (*Source) Close

func (s *Source) Close() error

func (*Source) Ping

func (s *Source) Ping(ctx context.Context) error

func (*Source) Read

func (s *Source) Read(ctx context.Context) (hermod.Message, error)

Jump to

Keyboard shortcuts

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