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 ¶
Types ¶
type Collector ¶
type Collector interface {
Update(ctx context.Context, server *server, ch chan<- prometheus.Metric) 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.
Click to show internal directories.
Click to hide internal directories.