Documentation ¶
Index ¶
- type Service
- func (service *Service) Gather() ([]*dto.MetricFamily, error)
- func (service *Service) MustRegister(cs ...prometheus.Collector)
- func (service *Service) NewCounter(opts prometheus.CounterOpts) prometheus.Counter
- func (service *Service) NewCounterFunc(opts prometheus.CounterOpts, function func() float64) prometheus.CounterFunc
- func (service *Service) NewCounterVec(opts prometheus.CounterOpts, labelNames []string) *prometheus.CounterVec
- func (service *Service) NewGauge(opts prometheus.GaugeOpts) prometheus.Gauge
- func (service *Service) NewGaugeFunc(opts prometheus.GaugeOpts, function func() float64) prometheus.GaugeFunc
- func (service *Service) NewGaugeVec(opts prometheus.GaugeOpts, labelNames []string) *prometheus.GaugeVec
- func (service *Service) NewHistogram(opts prometheus.HistogramOpts) prometheus.Histogram
- func (service *Service) NewHistogramVec(opts prometheus.HistogramOpts, labelNames []string) *prometheus.HistogramVec
- func (service *Service) NewSummary(opts prometheus.SummaryOpts) prometheus.Summary
- func (service *Service) NewSummaryVec(opts prometheus.SummaryOpts, labelNames []string) *prometheus.SummaryVec
- func (service *Service) Register(c prometheus.Collector) error
- func (service *Service) Restart() error
- func (service *Service) Start() error
- func (service *Service) Stop() error
- func (service *Service) Unregister(c prometheus.Collector) bool
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) Unregister ¶
func (service *Service) Unregister(c prometheus.Collector) bool
Unregister implements prometheus.Registerer.
Directories ¶
Path | Synopsis |
---|---|
examples
|
|
Package promfasthttp provides tooling around HTTP servers.
|
Package promfasthttp provides tooling around HTTP servers. |
Package promhermes provides tooling around HTTP servers.
|
Package promhermes provides tooling around HTTP servers. |