sqlstats: github.com/dlmiddlecote/sqlstats Index | Files

package sqlstats

import "github.com/dlmiddlecote/sqlstats"

Index

Package Files

collector.go

type StatsCollector Uses

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

StatsCollector implements the prometheus.Collector interface.

func NewStatsCollector Uses

func NewStatsCollector(dbName string, sg StatsGetter) *StatsCollector

NewStatsCollector creates a new StatsCollector.

func (StatsCollector) Collect Uses

func (c StatsCollector) Collect(ch chan<- prometheus.Metric)

Collect implements the prometheus.Collector interface.

func (StatsCollector) Describe Uses

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

Describe implements the prometheus.Collector interface.

type StatsGetter Uses

type StatsGetter interface {
    Stats() sql.DBStats
}

StatsGetter is an interface that gets sql.DBStats. It's implemented by e.g. *sql.DB or *sqlx.DB.

Package sqlstats imports 2 packages (graph). Updated 2020-01-28. Refresh now. Tools for package owners.