filtering

package
v1.2.23 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2020 License: Apache-2.0 Imports: 4 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FilterObj

type FilterObj struct {
	Allow []string `json:",omitempty"`
	Deny  []string `json:",omitempty"`
}

FilterObj contains the Allow and Deny objects

type FilteredForwarder

type FilteredForwarder struct {
	FilteredDatapoints int64
	// contains filtered or unexported fields
}

FilteredForwarder is a struct to hold the filtering logic

func (*FilteredForwarder) FilterDatapoints

func (f *FilteredForwarder) FilterDatapoints(datapoints []*datapoint.Datapoint) []*datapoint.Datapoint

FilterDatapoints filters datapoints based on the metric name as well as counts how many it filters

func (*FilteredForwarder) FilterMetricName

func (f *FilteredForwarder) FilterMetricName(metricName string) bool

FilterMetricName returns true for a metric which matches allow, or if no allow rules are present, if it didn't match deny. Returns false otherwise.

func (*FilteredForwarder) GetFilteredDatapoints

func (f *FilteredForwarder) GetFilteredDatapoints() []*datapoint.Datapoint

GetFilteredDatapoints returns a cumulative counter of how many datapoints were filtered by this forwarder

func (*FilteredForwarder) Setup

func (f *FilteredForwarder) Setup(filters *FilterObj) error

Setup the FilteredForwarder based on the FilteredForwarderConfig

Jump to

Keyboard shortcuts

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