Documentation ¶
Index ¶
- func CheckRegexString(candidateRegex string) error
- func ConvertRegexMatchAndSubstitute(ctx context.Context, in *v32.RegexMatchAndSubstitute) (*envoy_type_matcher_v3.RegexMatchAndSubstitute, error)
- func NewCheckedRegex(ctx context.Context, candidateRegex string) (*envoy_type_matcher_v3.RegexMatcher, error)
- func NewRegex(ctx context.Context, candidateRegex string) *envoy_type_matcher_v3.RegexMatcher
- func NewRegexFromSettings(settings *v1.Settings, candidateRegex string) *envoy_type_matcher_v3.RegexMatcher
- func NewRegexWithProgramSize(candidateRegex string, programsize *uint32) *envoy_type_matcher_v3.RegexMatcher
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckRegexString ¶ added in v1.16.18
CheckRegexString to make sure the string is a valid RE2 expression
func ConvertRegexMatchAndSubstitute ¶ added in v1.9.25
func ConvertRegexMatchAndSubstitute(ctx context.Context, in *v32.RegexMatchAndSubstitute) (*envoy_type_matcher_v3.RegexMatchAndSubstitute, error)
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.