prometheuscollector

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

package prometheuscollector allows to expose metrics for Prometheus.

Using the provided collector, you can easily expose metrics for tusd in the Prometheus exposition format (https://prometheus.io/docs/instrumenting/exposition_formats/):

handler, err := handler.NewHandler(…)
collector := prometheuscollector.New(handler.Metrics)
prometheus.MustRegister(collector)

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 New

func New(metrics handler.Metrics) Collector

New creates a new collector which read froms the provided Metrics struct.

func (Collector) Collect

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

func (Collector) Describe

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

Jump to

Keyboard shortcuts

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