reconcilers

package
v0.0.0-...-14b8f79 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2025 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ReconcileLimit = 100
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Connector

type Connector interface {
	AcquireRead(ctx context.Context) (*pgxpool.Conn, error)
	AcquireWrite(ctx context.Context) (*pgxpool.Conn, error)
}

type Listener

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

func NewListener

func NewListener(connector Connector, schema Schema, logger Logger, timeout time.Duration) *Listener

func (*Listener) Reconcile

func (l *Listener) Reconcile(ctx context.Context, p Processor) error

func (*Listener) ValuesChanged

func (l *Listener) ValuesChanged(values, added, removed []uint32) error

type Logger

type Logger interface {
	InfofCtx(ctx context.Context, template string, args ...any)
	ErrorfCtx(ctx context.Context, template string, args ...any)
}

type Periodic

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

func NewPeriodic

func NewPeriodic(logger Logger, connector Connector, schema Schema, valuer Valuer, interval time.Duration, timeout time.Duration, processTimeout time.Duration) *Periodic

func (*Periodic) Reconcile

func (h *Periodic) Reconcile(ctx context.Context, p Processor) error

type Processor

type Processor interface {
	Process(ctx context.Context, stream es.StreamReference) error
}

type Reconciler

type Reconciler interface {
	Reconcile(ctx context.Context, p Processor) error
}

type Schema

type Schema interface {
	SelectOutboxStreamIDs(ctx context.Context, db dbtx.DBTX, graceWindow time.Duration, partitions []uint32, token string, limit int) ([]es.StreamReference, error)
	Listen(ctx context.Context, db dbtx.DBTX, partitions []uint32) error
	Unlisten(ctx context.Context, db dbtx.DBTX, partitions []uint32) error
}

type Valuer

type Valuer interface {
	Values() []uint32
}

Jump to

Keyboard shortcuts

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