pkg

package
v6.0.0-beta.0...-36e5a8e Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2026 License: BSD-3-Clause Imports: 0 Imported by: 0

Documentation

Overview

Package pkg is the root of pgwatch's public API.

It contains no code itself. Every subdirectory of pkg is an importable package that external modules may build on:

pkg/cmdopts    command-line options, config readers, schema constants
pkg/db         database helpers shared by the engine
pkg/log        logging setup and context plumbing
pkg/metrics    metric definitions and their reader/writer
pkg/reaper     the measurement gathering loop
pkg/sinks      measurement sinks
pkg/sources    monitored source definitions and their reader/writer
pkg/webserver  the REST API and static UI server
pkg/ui         the Provider interface for pluggable web UIs
pkg/app        the optional bootstrap wrapping the whole wiring sequence

Anything under internal/ is private to pgwatch and may change without notice. See docs/developer/api_stability.md for the stability policy that governs the packages listed above.

Directories

Path Synopsis
Package app bootstraps pgwatch: it wires the logger, the configuration readers, the sink writer, the schema check, the reaper and the web server into the same startup sequence the pgwatch binary runs, and owns signal handling, panic recovery and exit-code mapping.
Package app bootstraps pgwatch: it wires the logger, the configuration readers, the sink writer, the schema check, the reaper and the web server into the same startup sequence the pgwatch binary runs, and owns signal handling, panic recovery and exit-code mapping.
Package cmdopts provides functionality to parse command line options and ENV variables.
Package cmdopts provides functionality to parse command line options and ENV variables.
Package db provides common functionality to work with databases.
Package db provides common functionality to work with databases.
Package log contains the logger interface and its implementation used in the project.
Package log contains the logger interface and its implementation used in the project.
Package metrics is responsible for reading and writing metric definitions.
Package metrics is responsible for reading and writing metric definitions.
Package reaper is responsible to query the metrics from monitored sources and send measurements to sinks.
Package reaper is responsible to query the metrics from monitored sources and send measurements to sinks.
Package sinks provides functionality to store monitored data in different ways.
Package sinks provides functionality to store monitored data in different ways.
Provides functionality to read monitored data from different sources.
Provides functionality to read monitored data from different sources.
Package ui defines the contract between the pgwatch web server and the web user interface it serves.
Package ui defines the contract between the pgwatch web server and the web user interface it serves.
Package webserver serves the REST API and the web user interface.
Package webserver serves the REST API and the web user interface.

Jump to

Keyboard shortcuts

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