Documentation ¶
Index ¶
- Variables
- func AddRows(mrs []storage.MetricRow) error
- func DeleteMetrics(tfss []*storage.TagFilters) (int, error)
- func GetSeriesCount() (uint64, error)
- func Init()
- func InitWithoutMetrics()
- func RequestHandler(w http.ResponseWriter, r *http.Request) bool
- func SearchTagEntries(maxTagKeys, maxTagValues int) ([]storage.TagEntry, error)
- func SearchTagKeys(maxTagKeys int) ([]string, error)
- func SearchTagValues(tagKey []byte, maxTagValues int) ([]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 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 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 SearchTagValues ¶
SearchTagValues searches for tag values for the given tagKey
Types ¶
This section is empty.