promsrv

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2019 License: MIT Imports: 2 Imported by: 1

README

go-rscsrv-prometheus CircleCI

Getting Started

Prerequisites

What things you need to setup the project:

Environment

Close the repository:

git clone git@github.com:lab259/go-rscsrv-prometheus.git

Now, the dependencies must be installed.

cd go-rscsrv-prometheus && go mod download

😉 Finally, you are done to start developing.

Running tests

In the src/github.com/lab259/go-rscsrv-prometheus directory, execute:

make test

To enable coverage, execute:

make coverage

To generate the HTML coverage report, execute:

make coverage coverage-html

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

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

Service represents a Prometheus service.

func (*Service) Gather

func (service *Service) Gather() ([]*dto.MetricFamily, error)

Gather implements prometheus.Gatherer.

func (*Service) MustRegister

func (service *Service) MustRegister(cs ...prometheus.Collector)

MustRegister implements prometheus.Registerer.

func (*Service) NewCounter

func (service *Service) NewCounter(opts prometheus.CounterOpts) prometheus.Counter

NewCounter works like the function of the same name in the prometheus package but it automatically registers the Counter with the service's internal registry. If the registration fails, NewCounter panics.

func (*Service) NewCounterFunc

func (service *Service) NewCounterFunc(opts prometheus.CounterOpts, function func() float64) prometheus.CounterFunc

NewCounterFunc works like the function of the same name in the prometheus package but it automatically registers the CounterFunc with the service's internal registry. If the registration fails, NewCounterFunc panics.

func (*Service) NewCounterVec

func (service *Service) NewCounterVec(opts prometheus.CounterOpts, labelNames []string) *prometheus.CounterVec

NewCounterVec works like the function of the same name in the prometheus package but it automatically registers the CounterVec with the service's internal registry. If the registration fails, NewCounterVec panics.

func (*Service) NewGauge

func (service *Service) NewGauge(opts prometheus.GaugeOpts) prometheus.Gauge

NewGauge works like the function of the same name in the prometheus package but it automatically registers the Gauge with the service's internal registry. If the registration fails, NewGauge panics.

func (*Service) NewGaugeFunc

func (service *Service) NewGaugeFunc(opts prometheus.GaugeOpts, function func() float64) prometheus.GaugeFunc

NewGaugeFunc works like the function of the same name in the prometheus package but it automatically registers the GaugeFunc with the service's internal registry. If the registration fails, NewGaugeFunc panics.

func (*Service) NewGaugeVec

func (service *Service) NewGaugeVec(opts prometheus.GaugeOpts, labelNames []string) *prometheus.GaugeVec

NewGaugeVec works like the function of the same name in the prometheus package but it automatically registers the GaugeVec with the service's internal registry. If the registration fails, NewGaugeVec panics.

func (*Service) NewHistogram

func (service *Service) NewHistogram(opts prometheus.HistogramOpts) prometheus.Histogram

NewHistogram works like the function of the same name in the prometheus package but it automatically registers the Histogram with the service's internal registry. If the registration fails, NewHistogram panics.

func (*Service) NewHistogramVec

func (service *Service) NewHistogramVec(opts prometheus.HistogramOpts, labelNames []string) *prometheus.HistogramVec

NewHistogramVec works like the function of the same name in the prometheus package but it automatically registers the HistogramVec with the service's internal registry. If the registration fails, NewHistogramVec panics.

func (*Service) NewSummary

func (service *Service) NewSummary(opts prometheus.SummaryOpts) prometheus.Summary

NewSummary works like the function of the same name in the prometheus package but it automatically registers the Summary with the service's internal registry. If the registration fails, NewSummary panics.

func (*Service) NewSummaryVec

func (service *Service) NewSummaryVec(opts prometheus.SummaryOpts, labelNames []string) *prometheus.SummaryVec

NewSummaryVec works like the function of the same name in the prometheus package but it automatically registers the SummaryVec with the service's internal registry. If the registration fails, NewSummaryVec panics.

func (*Service) Register

func (service *Service) Register(c prometheus.Collector) error

Register implements prometheus.Registerer.

func (*Service) Restart

func (service *Service) Restart() error

Restart restarts the Prometheus service.

func (*Service) Start

func (service *Service) Start() error

Start starts the Prometheus service.

func (*Service) Stop

func (service *Service) Stop() error

Stop stops the Prometheus service.

func (*Service) Unregister

func (service *Service) Unregister(c prometheus.Collector) bool

Unregister implements prometheus.Registerer.

Directories

Path Synopsis
examples
Package promhermes provides tooling around HTTP servers.
Package promhermes provides tooling around HTTP servers.

Jump to

Keyboard shortcuts

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