configs

package
v0.0.0-...-9ad39c4 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseConfig

func ParseConfig(content []byte) error

Types

type Config

type Config struct {
	Filters   []*FilterConfig           `mapstructure:"filters"`
	Exporters map[string]ExporterConfig `mapstructure:"exporters"`
}
var GlobalConfig Config

type ExporterConfig

type ExporterConfig map[string]interface{}

type FilterConfig

type FilterConfig struct {
	Reason string `yaml:"reason"`

	Message string `yaml:"message"`

	MinCount int32  `yaml:"minCount"`
	Type     string `yaml:"type"`

	Action string `yaml:"action"`

	Kind string `yaml:"kind"`

	Namespace string `yaml:"namespace"`

	Name string `yaml:"name"`

	Service string `yaml:"service"`

	Exporters []string `yaml:"exporters"`
	// contains filtered or unexported fields
}

func (*FilterConfig) Filter

func (filter *FilterConfig) Filter(ctx context.Context, event *v1.Event) bool

Filter the given event with this filter instance. Return true if the event is filtered, return false otherwise.

func (*FilterConfig) Init

func (filter *FilterConfig) Init()

Jump to

Keyboard shortcuts

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