pq

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Listener

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

Listener a Notification listener for pq

func NewListener

func NewListener(
	dbDSN string,
	dbChannel string,
	minReconnectInterval time.Duration,
	maxReconnectInterval time.Duration,
	logger goengine.Logger,
	metrics sql.Metrics,
) (*Listener, error)

NewListener returns a new notification listener

func (*Listener) Listen

func (s *Listener) Listen(ctx context.Context, exec sql.ProjectionTrigger) error

Listen start listening on the configures dbChannel and when a notification is received call the trigger

Jump to

Keyboard shortcuts

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