collector

package
v0.0.0-...-a9c8dc3 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2024 License: Apache-2.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 Collector

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

func NewCollector

func NewCollector(logger log.Logger, cfg *Config) *Collector

NewCollector creates a new collector from the given config

func (*Collector) Collect

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

Collect collects all metrics for this collector and emits them down the provided channel Implements prometheus.Collector

func (*Collector) Describe

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

Describe emits all metric descriptions of the collector down the given channel Implements prometheus.Collector

type Config

type Config struct {
	DSN          string
	DatabaseName string
}

func (*Config) Validate

func (c *Config) Validate() error

Jump to

Keyboard shortcuts

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