sqlstats

package module
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2019 License: MIT Imports: 2 Imported by: 45

README

sqlstats

A Go library for collecting sql.DBStats

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type StatsCollector

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

StatsCollector implements the prometheus.Collector interface.

func NewStatsCollector

func NewStatsCollector(sg StatsGetter) *StatsCollector

NewStatsCollector creates a new StatsCollector.

func (StatsCollector) Collect

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

Collect implements the prometheus.Collector interface.

func (StatsCollector) Describe

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

Describe implements the prometheus.Collector interface.

type StatsGetter

type StatsGetter interface {
	Stats() sql.DBStats
}

StatsGetter ...

Jump to

Keyboard shortcuts

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