postgres

package
v0.26.0 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package postgres implements a read-only health check for PostgreSQL: it connects to each target and evaluates transaction-id wraparound risk, connection saturation, inactive replication slots retaining WAL, and — on a primary — replica lag. All queries are read-only; the check never runs DDL or writes.

Database access is abstracted behind the collector interface so the finding logic is unit-tested with a fake; the pgx-backed collector lives in pgx.go.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Check

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

func New

func New(cfg engine.PostgresConfig) *Check

func (*Check) Name

func (c *Check) Name() string

func (*Check) Run

func (c *Check) Run(ctx context.Context) []engine.Finding

Jump to

Keyboard shortcuts

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