pg_listener

package
v0.6.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DBListener

type DBListener struct {
	// contains filtered or unexported fields
}

func NewDBListener

func NewDBListener(config ListenerConfig, handler NotificationHandler) *DBListener

func (*DBListener) Start

func (d *DBListener) Start()

type ListenerConfig

type ListenerConfig struct {
	PgConnStr string
	Interval  time.Duration
	Timeout   time.Duration
}

type NotificationHandler

type NotificationHandler interface {
	HandleNotification(table string, data map[string]interface{}) error
}

type NotificationPayload

type NotificationPayload struct {
	Table string                 `json:"table"`
	Data  map[string]interface{} `json:"data"`
}

Jump to

Keyboard shortcuts

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