Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
RegisterMetric = NewMetricsRegister()
)
Functions ¶
This section is empty.
Types ¶
type CounterMetric ¶
type CounterMetric struct { Metric Counter prometheus.Counter }
func NewCounterWithOpts ¶
func NewCounterWithOpts(opts prometheus.CounterOpts) CounterMetric
func (CounterMetric) Get ¶
func (g CounterMetric) Get() *Metric
type CounterVecMetric ¶
type CounterVecMetric struct { Metric CounterVec *prometheus.CounterVec }
func NewCounterVecWithOpts ¶
func NewCounterVecWithOpts(opts prometheus.CounterOpts, labelNames []string) CounterVecMetric
func (CounterVecMetric) Get ¶
func (g CounterVecMetric) Get() *Metric
type GaugeMetric ¶
type GaugeMetric struct { Metric Gauge prometheus.Gauge }
func NewGaugeWithOpts ¶
func NewGaugeWithOpts(opts prometheus.GaugeOpts) GaugeMetric
func (GaugeMetric) Get ¶
func (g GaugeMetric) Get() *Metric
type MetricRegistry ¶
type MetricRegistry struct { Registerer prometheus.Registerer Metrics []*Metric // contains filtered or unexported fields }
func NewMetricsRegister ¶
func NewMetricsRegister() *MetricRegistry
func (*MetricRegistry) MustRegister ¶
func (m *MetricRegistry) MustRegister(cs IMetric)
MustRegister registers a metric if it hasn't been registered yet.
Usage: MustRegister(...) Example:
func init() { metrics.RegisterMetric.MustRegister(errorsTotal) }
Click to show internal directories.
Click to hide internal directories.