Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// > @3@4@5@6
// >
// > Prioritized list of fields. The first field found will be used to calculate the hash.
// >
// > `Field` params:
// > * **`field`** *`cfg.FieldSelector`* *`required`*
// >
// > The event field for calculating the hash.
// >
// > * **`format`** *`string`* *`default=no`* *`options=no|normalize`*
// >
// > The field format for various hashing algorithms.
// >
// > * **`max_size`** *`int`* *`default=0`*
// >
// > The maximum field size used in hash calculation of any format.
// > If set to `0`, the entire field will be used in hash calculation.
// >
// > > If the field size is greater than `max_size`, then
// > the first `max_size` bytes will be used in hash calculation.
// > >
// > > It can be useful in case of performance degradation when calculating the hash of long fields.
Fields []Field `json:"fields" slice:"true" required:"true"` // *
// > @3@4@5@6
// >
// > The event field to which put the hash.
ResultField cfg.FieldSelector `json:"result_field" parse:"selector" required:"true"` // *
ResultField_ []string
// > @3@4@5@6
// >
// > Normalizer params. It works for `fields` with `format: normalize`.
// >> For more information, see [Normalization](/plugin/action/hash/normalize/README.md).
// >
// > `NormalizerConfig` params:
// > * **`builtin_patterns`** *`string`* *`default="all"`*
// >
// > List of [built-in patterns](/plugin/action/hash/normalize/README.md#built-in-patterns) (see `pattern id` column).
// >
// > Format: `pattern_id1|pattern_id2|...|pattern_idN`.
// >
// > Example: `host|url|square_bracketed`.
// >
// > > * If set to `all` - all built-in patterns will be used.
// > > * If set to `no` - built-in patterns will not be used.
// >
// > * **`custom_patterns`** *`[]NormalizePattern`*
// >
// > List of normalization patterns.
// >
// > `NormalizePattern` params:
// > * **`placeholder`** *`string`* *`required`*
// >
// > A placeholder that replaces the parts of string that falls under specified pattern.
// >
// > * **`re`** *`string`* *`required`*
// >
// > A regular expression that describes a pattern.
// > > We have some [limitations](/plugin/action/hash/normalize/README.md#limitations-of-the-re-language) of the RE syntax.
// >
// > * **`priority`** *`string`* *`default=first`* *`options=first|last`*
// >
// > A priority of pattern. Works only if `normalizer.builtin_patterns != "no"`.
// >
// > If set to `first`, pattern will be added before built-in, otherwise - after.
// >
// > > If `normalizer.builtin_patterns = "no"`, then the priority is determined
// > by the order of the elements in `normalizer.custom_patterns`.
Normalizer NormalizerConfig `json:"normalizer" child:"true"` // *
}
! config-params ^ config-params
type Field ¶
type Field struct {
Field cfg.FieldSelector `json:"field" parse:"selector" required:"true"`
Field_ []string
Format string `json:"format" default:"no" options:"no|normalize"`
Format_ fieldFormat
MaxSize int `json:"max_size" default:"0"`
}
type NormalizePattern ¶ added in v0.54.0
type NormalizerConfig ¶ added in v0.54.0
type NormalizerConfig struct {
BuiltinPatterns string `json:"builtin_patterns" default:"all"`
CustomPatterns []NormalizePattern `json:"custom_patterns" slice:"true"`
}
Click to show internal directories.
Click to hide internal directories.