postgres

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2022 License: MPL-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PSQL

type PSQL struct {
	*common.Logger
	sync.RWMutex
	// contains filtered or unexported fields
}

PSQL is a PostgreSQL source

func New

func New(name string, v *viper.Viper) (s *PSQL, err error)

New creates a new PostgreSQL source

func (*PSQL) Close

func (src *PSQL) Close() error

Close stops the replication and exits

func (*PSQL) Flush

func (src *PSQL) Flush() (err error)

Flush reports to PostgreSQL that all events are consumed and applied This allows it to remove logs.

func (*PSQL) Name

func (src *PSQL) Name() string

Name returns source name

func (*PSQL) SetLogger

func (src *PSQL) SetLogger(l *common.Logger)

SetLogger sets a logger

func (*PSQL) Start

func (src *PSQL) Start()

Start instructs source to begin streaming the events

func (*PSQL) Stats

func (src *PSQL) Stats() string

Stats returns source's statistics

func (*PSQL) Status

func (src *PSQL) Status() error

Status returns the status for the source

func (*PSQL) Subscribe

func (src *PSQL) Subscribe(sink sink.Sink)

Subscribe registers a function to be called on event arrival

func (*PSQL) Type

func (src *PSQL) Type() string

Type returns source type Always "Source-PSQL"

Jump to

Keyboard shortcuts

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