exporter

package
v0.0.0-...-779d28c Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2023 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Exporter

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

Exporter collects PostgreSQL metrics and exports them via prometheus.

func MustNew

func MustNew(ctx context.Context, opts Opts) *Exporter

MustNew instantiates and returns a new Exporter or panics.

func New

func New(ctx context.Context, opts Opts) (*Exporter, error)

New instaniates and returns a new Exporter.

func (*Exporter) Collect

func (e *Exporter) Collect(ch chan<- prometheus.Metric)

Collect implements the promtheus.Collector.

func (*Exporter) Describe

func (e *Exporter) Describe(ch chan<- *prometheus.Desc)

Describe implements the prometheus.Collector.

func (*Exporter) HealthCheck

func (e *Exporter) HealthCheck(ctx context.Context) error

HealthCheck pings PostgreSQL.

func (*Exporter) Register

func (e *Exporter) Register()

Register the exporter.

func (*Exporter) WithCustomCollectors

func (e *Exporter) WithCustomCollectors(collectors ...collectors.Collector) *Exporter

WithCustomCollectors lets the exporter scrape custom metrics.

type Opts

type Opts struct {
	DBOpts []db.Opts
}

Opts for the exporter.

Directories

Path Synopsis
db

Jump to

Keyboard shortcuts

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