filter

package
v0.15.1 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2025 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Overview

Package filter is a pgSCV filter

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Filter

type Filter struct {
	// Exclude pattern string.
	Exclude string `yaml:"exclude,omitempty"`
	// Compiled exclude pattern regexp.
	ExcludeRE *regexp.Regexp
	// Include pattern string.
	Include string `yaml:"include,omitempty"`
	// Compiled include pattern regexp.
	IncludeRE *regexp.Regexp
}

Filter describes settings for filtering stats values for metrics.

func (*Filter) Pass

func (f *Filter) Pass(target string) bool

Pass checks that target is satisfied to filter's regexps.

type Filters

type Filters map[string]Filter

Filters is the set of named filters

func New

func New() Filters

New create new and empty Filters object.

func (Filters) Add

func (f Filters) Add(name string, filter Filter)

Add add new filter to existing set of filters. After adding new filter, filters should be recompiled.

func (Filters) Compile

func (f Filters) Compile() error

Compile walk trough filters and compile them.

Jump to

Keyboard shortcuts

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