metric

package
v1.15.0 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Metrics

type Metrics struct {
	TotalPushCount *prometheus.Desc
	IosSuccess     *prometheus.Desc
	IosError       *prometheus.Desc
	AndroidSuccess *prometheus.Desc
	AndroidError   *prometheus.Desc
	HuaweiSuccess  *prometheus.Desc
	HuaweiError    *prometheus.Desc
	QueueUsage     *prometheus.Desc
	GetQueueUsage  func() int
}

Metrics implements the prometheus.Metrics interface and exposes gorush metrics for prometheus

func NewMetrics

func NewMetrics(c ...func() int) Metrics

NewMetrics returns a new Metrics with all prometheus.Desc initialized

func (Metrics) Collect

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

Collect returns the metrics with values

func (Metrics) Describe

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

Describe returns all possible prometheus.Desc

Jump to

Keyboard shortcuts

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