vmstorage

package
v1.23.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 25, 2019 License: Apache-2.0 Imports: 12 Imported by: 5

README

vmstorage performs the following tasks:

  • Accepts inserts from vminsert and stores them to local storage.

  • Performs select requests from vmselect.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// DataPath is a path to storage data.
	DataPath = flag.String("storageDataPath", "victoria-metrics-data", "Path to storage data")
)
View Source
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.

WG must be incremented before Storage call.

Use syncwg instead of sync, since Add is called from concurrent goroutines.

Functions

func AddRows

func AddRows(mrs []storage.MetricRow) error

AddRows adds mrs to the storage.

func DeleteMetrics

func DeleteMetrics(tfss []*storage.TagFilters) (int, error)

DeleteMetrics deletes metrics matching tfss.

Returns the number of deleted metrics.

func GetSeriesCount

func GetSeriesCount() (uint64, error)

GetSeriesCount returns the number of time series in the storage.

func Init

func Init()

Init initializes vmstorage.

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

func SearchTagEntries(maxTagKeys, maxTagValues int) ([]storage.TagEntry, error)

SearchTagEntries searches for tag entries.

func SearchTagKeys

func SearchTagKeys(maxTagKeys int) ([]string, error)

SearchTagKeys searches for tag keys

func SearchTagValues

func SearchTagValues(tagKey []byte, maxTagValues int) ([]string, error)

SearchTagValues searches for tag values for the given tagKey

func Stop

func Stop()

Stop stops the vmstorage

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL