filter

package
v1.12.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2021 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Filter

func Filter(h heartbeat.Heartbeat, config Config) error

Filter determines, following the passed in configurations, if a heartbeat should be skipped. Returns Err to signal to the caller to skip the heartbeat.

func WithFiltering

func WithFiltering(config Config) heartbeat.HandleOption

WithFiltering initializes and returns a heartbeat handle option, which can be used in a heartbeat processing pipeline to filter heartbeats following the provided configurations.

Types

type Config

type Config struct {
	Exclude                    []regex.Regex
	ExcludeUnknownProject      bool
	Include                    []regex.Regex
	IncludeOnlyWithProjectFile bool
}

Config contains filtering configurations.

type Err

type Err string

Err is a heartbeat filtering error, signaling to skip the heartbeat.

func (Err) Error

func (e Err) Error() string

Error implements error interface.

Jump to

Keyboard shortcuts

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