yugabyte

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type YugabyteSource

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

YugabyteSource implements the hermod.Source interface for YugabyteDB. Since YugabyteDB is PostgreSQL-compatible, it uses pgx.

func NewYugabyteSource

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

func (*YugabyteSource) Ack

func (y *YugabyteSource) 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 (*YugabyteSource) Close

func (y *YugabyteSource) Close() error

func (*YugabyteSource) DiscoverDatabases

func (y *YugabyteSource) DiscoverDatabases(ctx context.Context) ([]string, error)

func (*YugabyteSource) DiscoverTables

func (y *YugabyteSource) DiscoverTables(ctx context.Context) ([]string, error)

func (*YugabyteSource) GetState

func (y *YugabyteSource) GetState() map[string]string

func (*YugabyteSource) Ping

func (y *YugabyteSource) Ping(ctx context.Context) error

func (*YugabyteSource) Read

func (*YugabyteSource) Sample

func (y *YugabyteSource) Sample(ctx context.Context, table string) (hermod.Message, error)

func (*YugabyteSource) SetLogger

func (y *YugabyteSource) SetLogger(logger hermod.Logger)

func (*YugabyteSource) SetState

func (y *YugabyteSource) SetState(state map[string]string)

func (*YugabyteSource) Snapshot

func (y *YugabyteSource) 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