Documentation ¶
Index ¶
- Variables
- func AddRows(mrs []storage.MetricRow) error
- func CheckTimeRange(tr storage.TimeRange) error
- func DeleteMetrics(tfss []*storage.TagFilters) (int, error)
- func GetSeriesCount(deadline uint64) (uint64, error)
- func GetTSDBStatusForDate(date uint64, topN int, deadline uint64) (*storage.TSDBStatus, error)
- func GetTSDBStatusWithFiltersForDate(tfss []*storage.TagFilters, date uint64, topN int, deadline uint64) (*storage.TSDBStatus, error)
- func Init(resetCacheIfNeeded func(mrs []storage.MetricRow))
- func InitWithoutMetrics(resetCacheIfNeeded func(mrs []storage.MetricRow))
- func RegisterMetricNames(mrs []storage.MetricRow) error
- func RequestHandler(w http.ResponseWriter, r *http.Request) bool
- func SearchGraphitePaths(tr storage.TimeRange, query []byte, maxPaths int, deadline uint64) ([]string, error)
- func SearchMetricNames(tfss []*storage.TagFilters, tr storage.TimeRange, maxMetrics int, ...) ([]storage.MetricName, error)
- func SearchTagEntries(maxTagKeys, maxTagValues int, deadline uint64) ([]storage.TagEntry, error)
- func SearchTagKeys(maxTagKeys int, deadline uint64) ([]string, error)
- func SearchTagKeysOnTimeRange(tr storage.TimeRange, maxTagKeys int, deadline uint64) ([]string, error)
- func SearchTagValueSuffixes(tr storage.TimeRange, tagKey, tagValuePrefix []byte, delimiter byte, ...) ([]string, error)
- func SearchTagValues(tagKey []byte, maxTagValues int, deadline uint64) ([]string, error)
- func SearchTagValuesOnTimeRange(tagKey []byte, tr storage.TimeRange, maxTagValues int, deadline uint64) ([]string, error)
- func Stop()
Constants ¶
This section is empty.
Variables ¶
var ( // DataPath is a path to storage data. DataPath = flag.String("storageDataPath", "victoria-metrics-data", "Path to storage data") )
var Storage *storage.Storage
Storage is a storage.
Every storage call must be wrapped into WG.Add(1) ... WG.Done() for proper graceful shutdown when Stop is called.
var WG syncwg.WaitGroup
WG must be incremented before Storage call.
Use syncwg instead of sync, since Add is called from concurrent goroutines.
Functions ¶
func CheckTimeRange ¶ added in v1.37.4
CheckTimeRange returns true if the given tr is denied for querying.
func DeleteMetrics ¶
func DeleteMetrics(tfss []*storage.TagFilters) (int, error)
DeleteMetrics deletes metrics matching tfss.
Returns the number of deleted metrics.
func GetSeriesCount ¶
GetSeriesCount returns the number of time series in the storage.
func GetTSDBStatusForDate ¶ added in v1.35.0
GetTSDBStatusForDate returns TSDB status for the given date.
func GetTSDBStatusWithFiltersForDate ¶ added in v1.60.0
func GetTSDBStatusWithFiltersForDate(tfss []*storage.TagFilters, date uint64, topN int, deadline uint64) (*storage.TSDBStatus, error)
GetTSDBStatusWithFiltersForDate returns TSDB status for given filters on the given date.
func InitWithoutMetrics ¶ added in v1.22.0
InitWithoutMetrics must be called instead of Init inside tests.
This allows multiple Init / Stop cycles.
func RegisterMetricNames ¶ added in v1.47.0
RegisterMetricNames registers all the metrics from mrs in the storage.
func RequestHandler ¶
func RequestHandler(w http.ResponseWriter, r *http.Request) bool
RequestHandler is a storage request handler.
func SearchGraphitePaths ¶ added in v1.53.0
func SearchGraphitePaths(tr storage.TimeRange, query []byte, maxPaths int, deadline uint64) ([]string, error)
SearchGraphitePaths returns all the metric names matching the given Graphite query.
func SearchMetricNames ¶ added in v1.47.0
func SearchMetricNames(tfss []*storage.TagFilters, tr storage.TimeRange, maxMetrics int, deadline uint64) ([]storage.MetricName, error)
SearchMetricNames returns metric names for the given tfss on the given tr.
func SearchTagEntries ¶ added in v1.19.0
SearchTagEntries searches for tag entries.
func SearchTagKeys ¶
SearchTagKeys searches for tag keys
func SearchTagKeysOnTimeRange ¶ added in v1.46.0
func SearchTagKeysOnTimeRange(tr storage.TimeRange, maxTagKeys int, deadline uint64) ([]string, error)
SearchTagKeysOnTimeRange searches for tag keys on tr.
func SearchTagValueSuffixes ¶ added in v1.41.0
func SearchTagValueSuffixes(tr storage.TimeRange, tagKey, tagValuePrefix []byte, delimiter byte, maxTagValueSuffixes int, deadline uint64) ([]string, error)
SearchTagValueSuffixes returns all the tag value suffixes for the given tagKey and tagValuePrefix on the given tr.
This allows implementing https://graphite-api.readthedocs.io/en/latest/api.html#metrics-find or similar APIs.
func SearchTagValues ¶
SearchTagValues searches for tag values for the given tagKey
Types ¶
This section is empty.