collector

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2022 License: Apache-2.0 Imports: 12 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNoData = errors.New("collector returned no data")

ErrNoData indicates the collector found no data to collect, but had no other error.

Functions

func IsNoDataError

func IsNoDataError(err error) bool

Types

type Collector

type Collector interface {
	Update(ctx context.Context, server *server, ch chan<- prometheus.Metric) error
}

func NewPGDatabaseCollector

func NewPGDatabaseCollector(logger log.Logger) (Collector, error)

func NewPGStatBGWriterCollector

func NewPGStatBGWriterCollector(logger log.Logger) (Collector, error)

type Option

type Option func(*PostgresCollector) error

type PGDatabaseCollector

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

func (PGDatabaseCollector) Update

func (PGDatabaseCollector) Update(ctx context.Context, server *server, ch chan<- prometheus.Metric) error

type PGStatBGWriterCollector

type PGStatBGWriterCollector struct {
}

func (PGStatBGWriterCollector) Update

func (PGStatBGWriterCollector) Update(ctx context.Context, server *server, ch chan<- prometheus.Metric) error

type PostgresCollector

type PostgresCollector struct {
	Collectors map[string]Collector
	// contains filtered or unexported fields
}

PostgresCollector implements the prometheus.Collector interface.

func NewPostgresCollector

func NewPostgresCollector(logger log.Logger, dsns []string, filters []string, options ...Option) (*PostgresCollector, error)

NewPostgresCollector creates a new PostgresCollector.

func (PostgresCollector) Collect

func (p PostgresCollector) Collect(ch chan<- prometheus.Metric)

Collect implements the prometheus.Collector interface.

func (PostgresCollector) Describe

func (p PostgresCollector) Describe(ch chan<- *prometheus.Desc)

Describe implements the prometheus.Collector interface.

Jump to

Keyboard shortcuts

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