db2

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DB2Source

type DB2Source struct {
	// contains filtered or unexported fields
}

DB2Source implements the hermod.Source interface for DB2. Note: Requires a DB2 driver like github.com/ibmdb/go_ibm_db to be registered.

func NewDB2Source

func NewDB2Source(connString string, tables []string, idField string, pollInterval time.Duration, useCDC bool) *DB2Source

func (*DB2Source) Ack

func (d *DB2Source) Ack(ctx context.Context, msg hermod.Message) error

Ack moves the persisted cursor to the acknowledged row. It must not move on read: GetState is the engine's persistence contract, so a cursor advanced when a row is handed out is already past rows still in flight, and a crash before the sinks wrote them erases them from the resume.

func (*DB2Source) Close

func (d *DB2Source) Close() error

func (*DB2Source) DiscoverDatabases

func (d *DB2Source) DiscoverDatabases(ctx context.Context) ([]string, error)

func (*DB2Source) DiscoverTables

func (d *DB2Source) DiscoverTables(ctx context.Context) ([]string, error)

func (*DB2Source) GetState

func (d *DB2Source) GetState() map[string]string

func (*DB2Source) Ping

func (d *DB2Source) Ping(ctx context.Context) error

func (*DB2Source) Read

func (d *DB2Source) Read(ctx context.Context) (hermod.Message, error)

func (*DB2Source) Sample

func (d *DB2Source) Sample(ctx context.Context, table string) (hermod.Message, error)

func (*DB2Source) SetLogger

func (d *DB2Source) SetLogger(logger hermod.Logger)

func (*DB2Source) SetState

func (d *DB2Source) SetState(state map[string]string)

func (*DB2Source) Snapshot

func (d *DB2Source) Snapshot(ctx context.Context, tables ...string) error

Jump to

Keyboard shortcuts

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