Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExcludeFilterFields ¶ added in v3.62.0
func ExcludeFilterFields() docs.FieldSpecs
ExcludeFilterFields returns a docs spec for the fields within a metadata config struct.
func IncludeFilterDocs ¶
func IncludeFilterDocs() docs.FieldSpecs
IncludeFilterDocs returns a docs spec for a metadata filter where keys are ignored by default and must be explicitly included.
Types ¶
type ExcludeFilter ¶ added in v3.62.0
type ExcludeFilter struct {
// contains filtered or unexported fields
}
ExcludeFilter provides a way to filter metadata keys based on a Metadata config.
type ExcludeFilterConfig ¶ added in v3.62.0
type ExcludeFilterConfig struct {
ExcludePrefixes []string `json:"exclude_prefixes" yaml:"exclude_prefixes"`
}
ExcludeFilterConfig describes actions to be performed on message metadata before being sent to an output destination.
func NewExcludeFilterConfig ¶ added in v3.62.0
func NewExcludeFilterConfig() ExcludeFilterConfig
NewExcludeFilterConfig returns a Metadata configuration struct with default values.
func (ExcludeFilterConfig) Filter ¶ added in v3.62.0
func (m ExcludeFilterConfig) Filter() (*ExcludeFilter, error)
Filter attempts to construct a metadata filter.
type IncludeFilter ¶ added in v3.62.0
type IncludeFilter struct {
// contains filtered or unexported fields
}
IncludeFilter provides a way to filter keys based on a Config.
func (*IncludeFilter) IsSet ¶ added in v3.62.0
func (f *IncludeFilter) IsSet() bool
IsSet returns true if there are any rules configured for matching keys.
func (*IncludeFilter) Iter ¶ added in v3.62.0
Iter applies a function to each metadata key value pair that passes the filter.
func (*IncludeFilter) Match ¶ added in v3.62.0
func (f *IncludeFilter) Match(str string) bool
Match returns true if the provided string matches the configured filters and false otherwise. It also returns false if no filters are configured.
type IncludeFilterConfig ¶
type IncludeFilterConfig struct { IncludePrefixes []string `json:"include_prefixes" yaml:"include_prefixes"` IncludePatterns []string `json:"include_patterns" yaml:"include_patterns"` }
IncludeFilterConfig contains configuration fields for a metadata filter where keys are ignored by default and must be explicitly included.
func NewIncludeFilterConfig ¶
func NewIncludeFilterConfig() IncludeFilterConfig
NewIncludeFilterConfig returns an IncludeFilterConfig struct with default values.
func (IncludeFilterConfig) CreateFilter ¶
func (c IncludeFilterConfig) CreateFilter() (*IncludeFilter, error)
CreateFilter attempts to construct a filter object.