re

package
v1.19.6 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2026 License: Apache-2.0 Imports: 6 Imported by: 2

Documentation

Overview

Package re provides a simple function to access compile regex objects for the FQDN subsystem.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompileRegex

func CompileRegex(p string) (*regexp.Regexp, error)

CompileRegex compiles a pattern p into a regex and returns the regex object. The regex object will be cached by an LRU. If p has already been compiled and cached, this function will return the cached regex object. If not already cached, it will compile p into a regex object and cache it in the LRU. This function will return an error if the LRU has not already been initialized.

func Resize added in v1.19.0

func Resize(logger *slog.Logger, size uint)

Types

type RegexCompileLRU

type RegexCompileLRU struct {
	// contains filtered or unexported fields
}

RegexCompileLRU is an LRU cache for storing compiled regex objects of FQDN names or patterns, used in CiliumNetworkPolicy or ClusterwideCiliumNetworkPolicy.

Jump to

Keyboard shortcuts

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