Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MetricMetadata ¶ added in v1.102.25
type MetricMetadata struct {
// Represents the metric type, these match the set from Prometheus.
// Refer to https://github.com/prometheus/common/blob/95acce133ca2c07a966a71d475fb936fc282db18/model/metadata.go for details.
Type uint32
MetricFamilyName string
Help string
Unit string
}
MetricMetadata represents additional meta information for specific MetricFamilyName Refer to https://github.com/prometheus/prometheus/blob/c5282933765ec322a0664d0a0268f8276e83b156/prompb/types.proto#L21
type Sample ¶
type Sample struct {
// Value is sample value.
Value float64
// Timestamp is unix timestamp for the sample in milliseconds.
Timestamp int64
}
Sample is a timeseries sample.
type TimeSeries ¶
type TimeSeries struct {
// Labels is a list of labels for the given TimeSeries
Labels []Label
// Samples is a list of samples for the given TimeSeries
Samples []Sample
}
TimeSeries is a timeseries.
type WriteRequest ¶
type WriteRequest struct {
// Timeseries is a list of time series in the given WriteRequest
Timeseries []TimeSeries
// Metadata is a list of metadata info in the given WriteRequest
Metadata []MetricMetadata
// contains filtered or unexported fields
}
WriteRequest represents Prometheus remote write API request.
func (*WriteRequest) UnmarshalProtobuf ¶ added in v1.97.0
func (wr *WriteRequest) UnmarshalProtobuf(src []byte) (err error)
UnmarshalProtobuf unmarshals wr from src.
src mustn't change while wr is in use, since wr points to src.
Click to show internal directories.
Click to hide internal directories.