query

package
v0.0.0-...-d30abd5 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2023 License: Apache-2.0 Imports: 1 Imported by: 0

README

package query

import "github.com/zeebo/rothko/api/query"

package query provides routines to query out of a set of metrics.

Usage

type Search struct {
}

Search represents a metric search.

func New
func New(query string, capacity int) *Search

New constructs a metric searcher from the query string.

func (*Search) Add
func (s *Search) Add(name string) (bool, error)

Add is meant to be passed to a disk.Metrics call.

func (*Search) Match
func (s *Search) Match(metric string) bool

Match checks if the Search matches the metric.

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

Matched returns the matched metrics.

Documentation

Overview

package query provides routines to query out of a set of metrics.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Search struct {
	// contains filtered or unexported fields
}

Search represents a metric search.

func New

func New(query string, capacity int) *Search

New constructs a metric searcher from the query string.

func (*Search) Add

func (s *Search) Add(name string) (bool, error)

Add is meant to be passed to a disk.Metrics call.

func (*Search) Match

func (s *Search) Match(metric string) bool

Match checks if the Search matches the metric.

func (*Search) Matched

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

Matched returns the matched metrics.

Jump to

Keyboard shortcuts

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