Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConnectToDb ¶
func ConnectToDb(cfg config.PostgresStoreConfig) (*sql.DB, error)
func ConnectToDbPgx ¶
func ConnectToDbPgx(postgresStoreConfig config.PostgresStoreConfig, customizers ...pgx_config.PgxConfigCustomization) (*pgxpool.Pool, error)
Types ¶
type Listener ¶
type Listener interface {
Notify() chan *Notification
Error() <-chan error
Close() error
}
func NewPgxListener ¶
NewPgxListener will create and initialize a PgxListener which will automatically connect and listen to the provided channel.
type Notification ¶
type Notification struct {
// Payload, or the empty string if unspecified.
Payload string
}
Notification represents a single notification from the database.
type PgxListener ¶
type PgxListener struct {
// contains filtered or unexported fields
}
PgxListener will listen for NOTIFY commands on a channel.
func (*PgxListener) Close ¶
func (l *PgxListener) Close() error
func (*PgxListener) Error ¶
func (l *PgxListener) Error() <-chan error
func (*PgxListener) Notify ¶
func (l *PgxListener) Notify() chan *Notification
Click to show internal directories.
Click to hide internal directories.