postgres

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2020 License: MPL-2.0 Imports: 16 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 (s *PSQL) Close() error

Close stops the replication and exits

func (*PSQL) Flush

func (s *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 (s *PSQL) Name() string

Name returns source name

func (*PSQL) SetLogger

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

SetLogger sets a logger

func (*PSQL) Start

func (s *PSQL) Start()

Start instructs source to begin streaming the events

func (*PSQL) Stats

func (s *PSQL) Stats() string

Stats returns source's statistics

func (*PSQL) Status

func (s *PSQL) Status() error

Status returns the status for the source

func (*PSQL) Subscribe

func (s *PSQL) Subscribe(sub sink.Sink)

Subscribe registers a function to be called on event arrival

func (*PSQL) Type

func (s *PSQL) Type() string

Type returns source type

Jump to

Keyboard shortcuts

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