regexutils

package
v1.18.0-beta16 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckRegexString added in v1.16.18

func CheckRegexString(candidateRegex string) error

CheckRegexString to make sure the string is a valid RE2 expression

func ConvertRegexMatchAndSubstitute added in v1.9.25

ConvertRegexMatchAndSubstitute into safe variant consumable by envoy. By default we use the RegexMatcher_GoogleRe2 matcher which as of envoy 1.21 is the only engine supported.

func NewCheckedRegex added in v1.16.18

func NewCheckedRegex(ctx context.Context, candidateRegex string) (*envoy_type_matcher_v3.RegexMatcher, error)

NewCheckedRegex creates a new regex matcher with the given regex. It is tightly coupled to envoy's implementation of regex.

func NewRegex

func NewRegex(ctx context.Context, candidateRegex string) *envoy_type_matcher_v3.RegexMatcher

NewRegex creates a new regex matcher with the given regex. It is tightly coupled to envoy's implementation of regex. Wraps NewRegexFromSettings which wraps NewRegexWithProgramSize which leads to the tight coupling. NOTE: Call this after having checked regex with CheckRegexString.

func NewRegexFromSettings

func NewRegexFromSettings(settings *v1.Settings, candidateRegex string) *envoy_type_matcher_v3.RegexMatcher

NewRegexFromSettings wraps NewRegexWithProgramSize with the program size from the settings. NOTE: Call this after having checked regex with CheckRegexString.

func NewRegexWithProgramSize

func NewRegexWithProgramSize(candidateRegex string, programsize *uint32) *envoy_type_matcher_v3.RegexMatcher

NewRegexWithProgramSize creates a new regex matcher with the given program size. This means its tightly coupled to envoy's implementation of regex. NOTE: Call this after having checked regex with CheckRegexString.

Types

This section is empty.

Jump to

Keyboard shortcuts

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