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 ¶
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 InitRegexCompileLRU ¶
InitRegexCompileLRU creates a new instance of the regex compilation LRU.
Types ¶
type RegexCompileLRU ¶
type RegexCompileLRU struct { // The lru package doesn't provide any concurrency guarantees so we must // provide our own locking. *lock.Mutex *lru.Cache }
RegexCompileLRU is an LRU cache for storing compiled regex objects of FQDN names or patterns, used in CiliumNetworkPolicy or ClusterwideCiliumNetworkPolicy.