mirror of
https://github.com/prometheus/prometheus
synced 2024-12-26 00:23:18 +00:00
Provide prototype of storage layer interfaces.
This commit is contained in:
parent
6589fc92f8
commit
59a708f25a
@ -51,12 +51,24 @@ type Sample struct {
|
||||
Timestamp time.Time
|
||||
}
|
||||
|
||||
type Samples struct {
|
||||
type SamplePair struct {
|
||||
Value SampleValue
|
||||
Timestamp time.Time
|
||||
}
|
||||
|
||||
type SampleSet struct {
|
||||
Metric Metric
|
||||
Values []SamplePair
|
||||
}
|
||||
|
||||
type Interval struct {
|
||||
OldestInclusive time.Time
|
||||
NewestInclusive time.Time
|
||||
}
|
||||
|
||||
// PENDING DELETION BELOW THIS LINE
|
||||
|
||||
type Samples struct {
|
||||
Value SampleValue
|
||||
Timestamp time.Time
|
||||
}
|
||||
|
@ -37,14 +37,14 @@ type MetricPersistence interface {
|
||||
|
||||
GetMetricForFingerprint(f *model.Fingerprint) (*model.Metric, error)
|
||||
|
||||
GetFirstValue(m *model.Metric) (*model.Sample, error)
|
||||
GetCurrentValue(m *model.Metric) (*model.Sample, error)
|
||||
GetBoundaryValues(m *model.Metric, i *model.Interval) (*model.SampleSet, error)
|
||||
GetRangeValues(m *model.Metric, i *model.Interval) (*model.SampleSet, error)
|
||||
|
||||
// DIAGNOSTIC FUNCTIONS PENDING DELETION BELOW HERE
|
||||
|
||||
GetAllLabelNames() ([]string, error)
|
||||
GetAllLabelPairs() ([]model.LabelSet, error)
|
||||
GetAllMetrics() ([]model.LabelSet, error)
|
||||
|
||||
// // BEGIN QUERY PRIMITIVES
|
||||
//
|
||||
// GetMetricValuesForIntervals(metric, interval) (values ...)
|
||||
// GetMetricValueLast()
|
||||
// // END QUERY PRIMITIVES
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user