postgres

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: 8 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 {
	Replication pgreplication.Config
}

type Listener

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

Listener contains the environment for subscribing and listening to postgres logical replication events.

func New

func New(handler replicationHandler, processEvent listenerProcessWalEvent, opts ...Option) *Listener

func (*Listener) Close

func (l *Listener) Close() error

Close closes the listener internal resources

func (*Listener) Listen

func (l *Listener) Listen(ctx context.Context) error

Listen starts the subscription process to listen for updates from PG.

type Option

type Option func(l *Listener)

func WithLogger

func WithLogger(logger loglib.Logger) Option

Jump to

Keyboard shortcuts

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