poolstats

package
v1.0.8 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Collector

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

Collector is a prometheus.Collector that will collect the nine statistics produced by pgxpool.Stat.

func NewCollector

func NewCollector(stater Stater, appname string) *Collector

NewCollector creates a new Collector to collect stats from pgxpool.

func (*Collector) Collect

func (c *Collector) Collect(metrics chan<- prometheus.Metric)

Collect implements the prometheus.Collector interface.

func (*Collector) Describe

func (c *Collector) Describe(ch chan<- *prometheus.Desc)

Describe implements the prometheus.Collector interface.

type Stater

type Stater interface {
	Stat() *pgxpool.Stat
}

Stater is a provider of the Stat() function. Implemented by pgxpool.Pool.

Jump to

Keyboard shortcuts

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