Documentation ¶
Index ¶
Constants ¶
View Source
const DefaultMetricsPath string = "/v1/metrics"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Collector ¶
Collector is an interface that mock collectors should implements, so they can be used for the end-to-end testing.
type MetricsStorage ¶
type MetricsStorage struct {
// contains filtered or unexported fields
}
MetricsStorage stores the metrics. Mock collectors could use it to store metrics they have received.
func NewMetricsStorage ¶
func NewMetricsStorage() MetricsStorage
NewMetricsStorage creates a new metrics storage.
func (*MetricsStorage) AddMetrics ¶
func (s *MetricsStorage) AddMetrics(request *collectormetricpb.ExportMetricsServiceRequest)
AddMetrics adds metrics to the metrics storage.
func (*MetricsStorage) GetMetrics ¶
func (s *MetricsStorage) GetMetrics() []*metricpb.Metric
GetMetrics returns the stored metrics.
Click to show internal directories.
Click to hide internal directories.