postgres

package
v2.10.0 Latest Latest
Warning

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

Go to latest
Published: May 15, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultBufferSize = 1000
)

Variables

This section is empty.

Functions

func NewWatcher

func NewWatcher(db *pachsql.DB, listener collection.PostgresListener, id string, channel string, opts ...WatcherOption) (*watcher, error)

Types

type Event

type Event struct {
	Id   uint64
	Type EventType
	Err  error
}

type EventType

type EventType uint8
const (
	// EventInsert happens when an item is added
	EventInsert EventType = iota
	// EventUpdate happens when an item is updated
	EventUpdate
	// EventDelete happens when an item is removed
	EventDelete
)

type WatcherOption

type WatcherOption func(*watcher)

func WithBufferSize

func WithBufferSize(size int) WatcherOption

Jump to

Keyboard shortcuts

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