transformer

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2025 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	TransformerRulesFile string
}

type Option

type Option func(t *Transformer)

func WithLogger

func WithLogger(l loglib.Logger) Option

type Rules

type Rules struct {
	Transformers []TableRules `yaml:"transformations"`
}

type RulesConfig

type RulesConfig struct{}

type TableRules

type TableRules struct {
	Schema      string                      `yaml:"schema"`
	Table       string                      `yaml:"table"`
	ColumnRules map[string]TransformerRules `yaml:"column_transformers"`
}

type Transformer

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

Transformer is a decorator around a wal processor that transforms wal event column values following the configured transformation rules.

func New

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

New will return a transformer processor wrapper that will transform incoming wal event column values as configured by the transformation rules.

func (*Transformer) Close

func (t *Transformer) Close() error

func (*Transformer) Name

func (t *Transformer) Name() string

func (*Transformer) ProcessWALEvent

func (t *Transformer) ProcessWALEvent(ctx context.Context, event *wal.Event) error

type TransformerRules

type TransformerRules struct {
	Name       string         `yaml:"name"`
	Parameters map[string]any `yaml:"parameters"`
}

Jump to

Keyboard shortcuts

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