package
0.0.0-20240811132321-117025e1dd22
Repository: https://github.com/stern-ritter/metrics-and-alerting-service.git
Documentation: pkg.go.dev

# Functions

CounterMetricToMetrics maps a CounterMetric to a Metrics.
GaugeMetricToMetrics maps a GaugeMetric to a Metrics.
MetricDataToMetrics converts a pb.MetricData to a Metrics structure.
MetricInfoToMetrics converts a pb.MetricInfo to a Metrics structure.
MetricsToCounterMetric maps a Metrics to a CounterMetric.
MetricsToGaugeMetric maps a Metrics to a GaugeMetric.
MetricsToMetricData converts a Metrics structure to a pb.MetricData.
MetricsToRepeatedMetricData converts a slice of Metrics to a slice of pb.MetricData.
NewCounter is constructor for creating a new CounterMetric with the specified name and initial value.
NewGauge is constructor for creating a new GaugeMetric with the specified name and value.
NewMetricsWithNumberValue is constructor for creating a new Metrics with the specified name, type, and value as a float64.
NewMetricsWithStringValue is constructor for creating a new Metrics with the specified name, type, and value as a string.
RepeatedMetricDataToMetrics converts a slice of pb.MetricData to a slice of Metrics.

# Constants

Counter is the counter metric type.
Gauge is the gauge metric type.

# Variables

SupportedCounterMetrics is a predefined map of supported counter metrics.
SupportedGaugeMetrics is a predefined map of supported gauge metrics.

# Structs

CounterMetric is a metric with an int value.
GaugeMetric is a metric with a float value.
Metric contains common attributes of a metric.
Metrics is a data transfer object for generic metric that can be gauge or counter.

# Type aliases

MetricType is the type of a metric.