processors

package
v0.115.0 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateK8SAttrRbacRules

func GenerateK8SAttrRbacRules(_ logr.Logger, config K8sAttributeConfig) ([]rbacv1.PolicyRule, error)

func GenerateResourceDetectionRbacRules

func GenerateResourceDetectionRbacRules(_ logr.Logger, config ResourceDetectionConfig) ([]rbacv1.PolicyRule, error)

func IsRegistered

func IsRegistered(name string) bool

IsRegistered checks whether a parser is registered with the given name.

func ProcessorFor

func ProcessorFor(name string) components.Parser

ProcessorFor returns a parser builder for the given exporter name.

func Register

func Register(name string, p components.Parser)

Register adds a new parser builder to the list of known builders.

Types

type Extract

type Extract struct {
	Metadata    []string             `mapstructure:"metadata"`
	Labels      []FieldExtractConfig `mapstructure:"labels"`
	Annotations []FieldExtractConfig `mapstructure:"annotations"`
}

type FieldExtractConfig

type FieldExtractConfig struct {
	TagName  string `mapstructure:"tag_name"`
	Key      string `mapstructure:"key"`
	KeyRegex string `mapstructure:"key_regex"`
	Regex    string `mapstructure:"regex"`
	From     string `mapstructure:"from"`
}

type K8sAttributeConfig

type K8sAttributeConfig struct {
	Extract Extract `mapstructure:"extract"`
}

K8sAttributeConfig is a minimal struct needed for parsing a valid k8sattribute processor configuration This only contains the fields necessary for parsing, other fields can be added in the future.

type ResourceDetectionConfig

type ResourceDetectionConfig struct {
	Detectors []string `mapstructure:"detectors"`
}

ResourceDetectionConfig is a minimal struct needed for parsing a valid resourcedetection processor configuration This only contains the fields necessary for parsing, other fields can be added in the future.

Jump to

Keyboard shortcuts

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