processor

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Connector

type Connector interface {
	AcquireWriteStream(ctx context.Context, streamType, streamID string) (*pgxpool.Conn, error)
}

type Processor

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

func New

func New(connector Connector, schema Schema, w es.Writer, rd Reader, backoff func(streamType string, retryCount int64) time.Duration) *Processor

func (*Processor) Process

func (p *Processor) Process(ctx context.Context, stream es.StreamReference) (err error)

type Reader

type Reader interface {
	Read(ctx context.Context, streamType, streamID string, eventNumber int64) iter.Seq2[es.Event, error]
}

type Schema

type Schema interface {
	SelectOutboxWatermark(ctx context.Context, db dbtx.DBTX, stream es.StreamReference) (database.OutboxWatermark, int64, error)
	UpdateOutboxWatermark(ctx context.Context, db dbtx.DBTX, stream es.StreamReference, delay time.Duration, watermark database.OutboxWatermark) error
}

type Writer

type Writer es.Writer

Jump to

Keyboard shortcuts

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