mariadb

package
v1.8.0 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MariaDBSource

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

MariaDBSource implements the hermod.Source interface for MariaDB. It uses polling as a baseline and can be extended for binlog CDC.

func NewMariaDBSource

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

func (*MariaDBSource) Ack

func (m *MariaDBSource) 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 (*MariaDBSource) Close

func (m *MariaDBSource) Close() error

func (*MariaDBSource) DiscoverDatabases

func (m *MariaDBSource) DiscoverDatabases(ctx context.Context) ([]string, error)

func (*MariaDBSource) DiscoverTables

func (m *MariaDBSource) DiscoverTables(ctx context.Context) ([]string, error)

func (*MariaDBSource) GetState

func (m *MariaDBSource) GetState() map[string]string

func (*MariaDBSource) Ping

func (m *MariaDBSource) Ping(ctx context.Context) error

func (*MariaDBSource) Read

func (m *MariaDBSource) Read(ctx context.Context) (hermod.Message, error)

func (*MariaDBSource) Sample

func (m *MariaDBSource) Sample(ctx context.Context, table string) (hermod.Message, error)

func (*MariaDBSource) SetLogger

func (m *MariaDBSource) SetLogger(logger hermod.Logger)

func (*MariaDBSource) SetState

func (m *MariaDBSource) SetState(state map[string]string)

func (*MariaDBSource) Snapshot

func (m *MariaDBSource) 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