filter

package
v0.11.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Name   string
	User   string
	From   int64
	To     int64
	Labels string
}

func (*Config) Register

func (c *Config) Register(cmd *kingpin.CmdClause)

type MetricFilter

type MetricFilter struct {
	User   string
	Name   string
	From   model.Time
	To     model.Time
	Labels []string
}

MetricFilter provides a set of matchers to determine whether a chunk should be returned

func NewMetricFilter

func NewMetricFilter(cfg Config) MetricFilter

NewMetricFilter returns a metric filter

func (*MetricFilter) Filter

func (f *MetricFilter) Filter(c chunk.Chunk) bool

Filter returns true if the chunk passes the filter

Jump to

Keyboard shortcuts

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