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 Init()
- func InitWithoutMetrics()
- func RequestHandler(w http.ResponseWriter, r *http.Request) bool
- func SearchTagEntries(maxTagKeys, maxTagValues int, deadline uint64) ([]storage.TagEntry, error)
- func SearchTagKeys(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 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 InitWithoutMetrics ¶ added in v1.22.0
func InitWithoutMetrics()
InitWithoutMetrics must be called instead of Init inside tests.
This allows multiple Init / Stop cycles.
func RequestHandler ¶
func RequestHandler(w http.ResponseWriter, r *http.Request) bool
RequestHandler is a storage request handler.
func SearchTagEntries ¶ added in v1.19.0
SearchTagEntries searches for tag entries.
func SearchTagKeys ¶
SearchTagKeys searches for tag keys
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.