Documentation ¶
Index ¶
- Variables
- type Metric
- type MetricCollector
- type MetricStore
- func (m *MetricStore) GetMetricsRegistry() *prometheus.Registry
- func (m *MetricStore) RegisterMetric(metric Metric) error
- func (m *MetricStore) RegisterPrefix(prefix string, cronEntry string) error
- func (m *MetricStore) StartCron()
- func (m *MetricStore) StopCron()
- func (m *MetricStore) StoreMetric(metric Metric) error
- func (m *MetricStore) UnregisterMetric(metric Metric) error
- func (m *MetricStore) UnregisterPrefix(prefix string) error
- type RegistrationRequest
- type StoreRequest
Constants ¶
This section is empty.
Variables ¶
View Source
var ( PrefixFailed = prometheus.NewCounterVec( prometheus.CounterOpts{ Name: "prompusher_prefix_failed", Help: "Total number of failed prefix checks.", }, []string{"prefix"}, ) )
Functions ¶
This section is empty.
Types ¶
type Metric ¶
type Metric struct { Name string `json:"name"` Prefix string `json:"prefix"` Labels []map[string]string `json:"labels"` Value float64 `json:"value"` Type string `json:"type"` Help string `json:"help"` }
func (Metric) ValidateMetrics ¶
ValidateMetrics validates if metrics fields are not empty
type MetricCollector ¶
type MetricCollector struct { PromMetric prometheus.Collector Type string }
type MetricStore ¶
type MetricStore struct { PromColectors map[string]MetricCollector // all prometheus metrics Cron *cron.Cron // cron // contains filtered or unexported fields }
func NewMetricStore ¶
func NewMetricStore() *MetricStore
func (*MetricStore) GetMetricsRegistry ¶
func (m *MetricStore) GetMetricsRegistry() *prometheus.Registry
func (*MetricStore) RegisterMetric ¶
func (m *MetricStore) RegisterMetric(metric Metric) error
func (*MetricStore) RegisterPrefix ¶
func (m *MetricStore) RegisterPrefix(prefix string, cronEntry string) error
func (*MetricStore) StoreMetric ¶
func (m *MetricStore) StoreMetric(metric Metric) error
func (*MetricStore) UnregisterMetric ¶
func (m *MetricStore) UnregisterMetric(metric Metric) error
func (*MetricStore) UnregisterPrefix ¶
func (m *MetricStore) UnregisterPrefix(prefix string) error
type RegistrationRequest ¶
Click to show internal directories.
Click to hide internal directories.