injector

package
v0.9.3 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2025 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrUseLSN = errors.New("use LSN as event version")

Functions

This section is empty.

Types

type Config

type Config struct {
	Store schemalogpg.Config
}

type Injector

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

Injector is a decorator around a wal processor that injects the wal metadata with the schemalog entry for the relevant schema. This allows following processors to have more information for processing the event effectively.

func New

func New(cfg *Config, p processor.Processor, opts ...Option) (*Injector, error)

New will return an injector processor wrapper that will inject pgstream metadata into the wal data events before passing them over to the processor on input. By default, all schemas are processed and the pgstream identity will be the primary key/not null unique column if present.

func (*Injector) Close

func (in *Injector) Close() error

func (*Injector) Name

func (in *Injector) Name() string

func (*Injector) ProcessWALEvent

func (in *Injector) ProcessWALEvent(ctx context.Context, event *wal.Event) error

ProcessWALEvent populates the metadata of the wal event on input, before passing it over to the configured wal processor.

type Option

type Option func(t *Injector)

func WithIDFinder

func WithIDFinder(idFinder columnFinder) Option

func WithInstrumentation

func WithInstrumentation(instr *otel.Instrumentation) Option

func WithLogger

func WithLogger(l loglib.Logger) Option

func WithVersionFinder

func WithVersionFinder(versionFinder columnFinderWithErr) Option

Jump to

Keyboard shortcuts

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