cdc

package
v1.18.0 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2026 License: MIT Imports: 3 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 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