pg

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// PgMaxRetries holds Pg connect retry count
	PgMaxRetries = 5

	// SQLPubFmt holds notification query format string
	SQLPubFmt = "SELECT %s(?)"
)

Variables

This section is empty.

Functions

func New

func New(epa types.EndPointAttr, dsn string) (types.EndPoint, error)

New create endpoint

func NewConnected

func NewConnected(epa types.EndPointAttr, db *engine.DB) (types.EndPoint, error)

NewConnected creates endpoint for connected service

Types

type EndPoint

type EndPoint struct {
	types.EndPointAttr
	// contains filtered or unexported fields
}

EndPoint holds database linked endpoint

func (EndPoint) Listen

func (ep EndPoint) Listen(id int, channel string, pipe chan string) error

Listen starts listening goroutine

func (EndPoint) Notify

func (ep EndPoint) Notify(id int, channel string, pipe chan string) error

Notify starts all notify goroutines

Jump to

Keyboard shortcuts

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