Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ToPrometheus ¶
Types ¶
type IMetrics ¶
type IMetrics interface { // Increase metric value with "delta". // The default metric value is always 0. // Naming best practices: https://prometheus.io/docs/practices/naming/ // // @ConcurrentAccess Increase(metricName string, vvmName string, valueDelta float64) // Increase app metric value with "delta". // The default metric value is always 0. // Naming best practices: https://prometheus.io/docs/practices/naming/ // // @ConcurrentAccess IncreaseApp(metricName string, vvmName string, app istructs.AppQName, valueDelta float64) // Returns address of metric value. // Only use atomic operations with that address! // // @ConcurrentAccess MetricAddr(metricName string, vvmName string) *MetricValue // Returns address of metric value. // Only use atomic operations with that address! // // @ConcurrentAccess AppMetricAddr(metricName string, vvmName string, app istructs.AppQName) *MetricValue // GetAll lists current values of all metrics // // @ConcurrentAccess List(cb func(metric IMetric, metricValue float64) (err error)) (err error) }
type MetricValue ¶
type MetricValue float64
func (*MetricValue) Increase ¶
func (m *MetricValue) Increase(delta float64)
type MetricsFactory ¶
type MetricsFactory func() IMetrics
Click to show internal directories.
Click to hide internal directories.