Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HTTPMiddleware ¶
HTTPMiddleware http connection metric reader
func IPCMiddleware ¶
IPCMiddleware unix-socket connection counter
func RegisterDBCollector ¶
RegisterDBCollector create metric colletor for given connection
Types ¶
type DBStatsCollector ¶
type DBStatsCollector struct {
// contains filtered or unexported fields
}
DBStatsCollector implements the prometheus.Collector interface.
func NewDBStatsCollector ¶
func NewDBStatsCollector(dbName string, sg DBStatsGetter) *DBStatsCollector
NewDBStatsCollector creates a new DBStatsCollector.
func (DBStatsCollector) Collect ¶
func (c DBStatsCollector) Collect(ch chan<- prometheus.Metric)
Collect implements the prometheus.Collector interface.
func (DBStatsCollector) Describe ¶
func (c DBStatsCollector) Describe(ch chan<- *prometheus.Desc)
Describe implements the prometheus.Collector interface.
type DBStatsGetter ¶
DBStatsGetter is an interface that gets sql.DBStats.
Click to show internal directories.
Click to hide internal directories.