consumer

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2019 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(ctx context.Context, logger *zap.SugaredLogger, errCh chan error, dbCfg pgx.ConnConfig, slotName, publicationName string, startLSN dbtypes.LSN) *consumer

New instantiates the consumer

Types

type Handler

type Handler interface {
	HandleMessage(dbtypes.LSN, message.Message) error
}

Handler represents interface for processing logical replication messages

type Interface

type Interface interface {
	SendStatus() error
	Run(Handler) error
	AdvanceLSN(dbtypes.LSN)
	CurrentLSN() dbtypes.LSN
	Wait()
}

Interface represents interface for the consumer

Jump to

Keyboard shortcuts

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