sanitizer

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(*Sanitizer)

func WithLogger

func WithLogger(l loglib.Logger) Option

type Sanitizer

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

Sanitizer is a decorator around a wal processor that sanitizes wal event column values before passing them to the inner processor. It strips null bytes (0x00) from string values, which PostgreSQL does not allow in text/varchar columns. Source databases may contain them due to historical bugs in older PostgreSQL versions where the binary receive function did not validate for null bytes.

func New

func New(inner processor.Processor, opts ...Option) *Sanitizer

func (*Sanitizer) Close

func (s *Sanitizer) Close() error

func (*Sanitizer) Name

func (s *Sanitizer) Name() string

func (*Sanitizer) ProcessWALEvent

func (s *Sanitizer) ProcessWALEvent(ctx context.Context, event *wal.Event) error

Jump to

Keyboard shortcuts

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