search

package
v0.0.0-...-7afe134 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2014 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Match

func Match(search string, values []string) ([]string, error)

Match returns all matching values against search. search is a regex, except that `.` is literal, `*` can be used for `.*`, and the entire string is searched (`^` and `&` added to ends of search).

Types

type MetricTagSet

type MetricTagSet struct {
	Metric string          `json:"metric"`
	Tags   opentsdb.TagSet `json:"tags"`
}
type Search struct {
	// tagk + tagv -> metrics
	Metric qmap
	// metric -> tag keys
	Tagk smap
	// metric + tagk -> tag values
	Tagv qmap
	// Each Record
	MetricTags mtsmap

	sync.RWMutex
}

Search is a struct to hold indexed data about OpenTSDB metric and tag data. It is suited to answering questions about: available metrics for a tag set, available tag keys for a metric, and available tag values for a metric and tag key.

func NewSearch

func NewSearch() *Search

func (*Search) Expand

func (s *Search) Expand(q *opentsdb.Query) error

func (*Search) FilteredTagValuesByMetricTagKey

func (s *Search) FilteredTagValuesByMetricTagKey(Metric, Tagk string, tsf map[string]string) []string

func (*Search) Index

func (s *Search) Index(mdp opentsdb.MultiDataPoint)

func (*Search) MetricsByTagPair

func (s *Search) MetricsByTagPair(Tagk, Tagv string) []string

func (*Search) TagKeysByMetric

func (s *Search) TagKeysByMetric(Metric string) []string

func (*Search) TagValuesByMetricTagKey

func (s *Search) TagValuesByMetricTagKey(Metric, Tagk string) []string

func (*Search) TagValuesByTagKey

func (s *Search) TagValuesByTagKey(Tagk string) []string

func (*Search) UniqueMetrics

func (s *Search) UniqueMetrics() []string

Jump to

Keyboard shortcuts

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