filter

package
v0.15.5 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2026 License: BSD-3-Clause Imports: 2 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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