Documentation ¶
Index ¶
- func ConvertJSONBytesToOpenMetricsText(inputBytes []byte) ([]byte, error)
- func ConvertJSONToOpenMetricsText(reader io.ReadCloser) ([]byte, error)
- func ConvertOpenMetricsTextToJSON(reader io.ReadCloser) ([]byte, error)
- func Query(reader io.ReadCloser, query string) ([]byte, error)
- type CounterMetric
- type CounterProcessor
- type GaugeMetric
- type GaugeProcessor
- type HistogramMetric
- type HistogramProcessor
- type Metric
- type MetricsEnvelope
- type MetricsSlice
- type SummaryMetric
- type SummaryProcessor
- type UntypedMetric
- type UntypedProcessor
- type ValueMetricData
- type ValueMetricDataProcessor
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertJSONToOpenMetricsText ¶
func ConvertJSONToOpenMetricsText(reader io.ReadCloser) ([]byte, error)
func ConvertOpenMetricsTextToJSON ¶
func ConvertOpenMetricsTextToJSON(reader io.ReadCloser) ([]byte, error)
Types ¶
type CounterMetric ¶
type CounterMetric struct {
Value float64 `json:"value,omitempty"`
}
func (*CounterMetric) ToPromMetrics ¶
func (m *CounterMetric) ToPromMetrics() *pmodel.Counter
type CounterProcessor ¶
type CounterProcessor struct{}
func (*CounterProcessor) Process ¶
func (p *CounterProcessor) Process(m *pmodel.Metric) ValueMetricData
type GaugeMetric ¶
type GaugeMetric struct {
Value float64 `json:"value,omitempty"`
}
func (*GaugeMetric) ToPromMetrics ¶
func (m *GaugeMetric) ToPromMetrics() *pmodel.Gauge
type GaugeProcessor ¶
type GaugeProcessor struct{}
func (*GaugeProcessor) Process ¶
func (p *GaugeProcessor) Process(m *pmodel.Metric) ValueMetricData
type HistogramMetric ¶
type HistogramMetric struct { Values map[string]uint64 `json:"values,omitempty"` SampleSum *float64 `json:"sampleSum,omitempty"` SampleCount *uint64 `json:"sampleCount,omitempty"` }
func (*HistogramMetric) ToPromMetrics ¶
func (m *HistogramMetric) ToPromMetrics() (*pmodel.Histogram, error)
type HistogramProcessor ¶
type HistogramProcessor struct{}
func (*HistogramProcessor) Process ¶
func (p *HistogramProcessor) Process(m *pmodel.Metric) ValueMetricData
type Metric ¶
type Metric struct { Type string `json:"type"` // for JSON unmarshalling Labels map[string]string `json:"labels,omitempty"` Data ValueMetricData `json:"data"` }
func (*Metric) UnmarshalJSON ¶
type MetricsEnvelope ¶
type MetricsSlice ¶
type MetricsSlice []*MetricsEnvelope
func (MetricsSlice) MarshallOpenMetricsText ¶
func (m MetricsSlice) MarshallOpenMetricsText() ([]byte, error)
type SummaryMetric ¶
type SummaryMetric struct { Values map[string]float64 `json:"values,omitempty"` SampleSum *float64 `json:"sampleSum,omitempty"` SampleCount *uint64 `json:"sampleCount,omitempty"` }
func (*SummaryMetric) ToPromMetrics ¶
func (m *SummaryMetric) ToPromMetrics() (*pmodel.Summary, error)
type SummaryProcessor ¶
type SummaryProcessor struct{}
func (*SummaryProcessor) Process ¶
func (p *SummaryProcessor) Process(m *pmodel.Metric) ValueMetricData
type UntypedMetric ¶
type UntypedMetric struct {
Value float64 `json:"value,omitempty"`
}
func (*UntypedMetric) ToPromMetrics ¶
func (m *UntypedMetric) ToPromMetrics() *pmodel.Untyped
type UntypedProcessor ¶
type UntypedProcessor struct{}
func (*UntypedProcessor) Process ¶
func (p *UntypedProcessor) Process(m *pmodel.Metric) ValueMetricData
type ValueMetricData ¶
type ValueMetricData interface {
// contains filtered or unexported methods
}
type ValueMetricDataProcessor ¶
type ValueMetricDataProcessor interface {
Process(m *pmodel.Metric) ValueMetricData
}
Source Files ¶
Click to show internal directories.
Click to hide internal directories.