processor

package
v0.0.0-...-61eb987 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrVersionNotFound = errors.New("version column not found")
	ErrIDNotFound      = errors.New("id column not found")
	ErrTableNotFound   = errors.New("table not found")
	ErrColumnNotFound  = errors.New("column not found")
)
View Source
var (
	ErrPanic               = errors.New("panic while processing wal event")
	ErrIncompatibleWalData = errors.New("wal data event is not a schema log entry")
)

Functions

func IsSchemaLogEvent

func IsSchemaLogEvent(d *wal.Data) bool

IsSchemaLogEvent will return true if the wal event data originates from the pgstream schema and the pgstream schema_log table.

func WalDataToLogEntry

func WalDataToLogEntry(d *wal.Data) (*schemalog.LogEntry, error)

WalDataToLogEntry will convert the wal event data on input into the equivalent schemalog entry. It will return an error if the wal event data is not from the schema log table.

Types

type Processor

type Processor interface {
	ProcessWALEvent(ctx context.Context, walEvent *wal.Event) error
	Name() string
}

Processor is a general interface to receive and process a wal event

Jump to

Keyboard shortcuts

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