postgres

package
v0.0.0-...-7b6d186 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2021 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Connect func(ctx context.Context, connString string) (DBExecutorContext, error) = connect

Connect function returns object that can execute sql against target database

View Source
var Logger *logrus.Entry

Logger provides access to the PostgreSQL specific logging facility

Functions

func Apply

func Apply(ctx context.Context, connString string, idleTimeout time.Duration, messages <-chan kafka.Message)

Apply function reads messages from `messages` channel and applies changes to the target PostgreSQL database

Types

type DBExecutorContext

type DBExecutorContext interface {
	Exec(ctx context.Context, sql string, arguments ...interface{}) (pgconn.CommandTag, error)
}

DBExecutorContext interface represents sql executor with context support

Jump to

Keyboard shortcuts

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