pgwatch

package
v0.0.0-...-9d75bea Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultQuery = `select usename, state, count(*) from pg_stat_activity where pid <> pg_backend_pid() group by 1,2 order by 1`

Variables

This section is empty.

Functions

This section is empty.

Types

type Monitor

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

func New

func New(db *sql.DB, opts Options) *Monitor

func (*Monitor) Run

func (m *Monitor) Run(ctx context.Context) error

type Options

type Options struct {
	Query    string
	Interval time.Duration
}

Jump to

Keyboard shortcuts

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