Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func PathClean ¶
PathClean is the URL version of path.Clean, it returns a canonical URL path for p, eliminating . and .. elements.
The following rules are applied iteratively until no further processing can be done:
- Replace multiple slashes with a single slash.
- Eliminate each . path name element (the current directory).
- Eliminate each inner .. path name element (the parent directory) along with the non-.. element that precedes it.
- Eliminate .. elements that begin a rooted path: that is, replace "/.." by "/" at the beginning of a path.
If the result of this process is an empty string, "/" is returned
Types ¶
type WildcardStore ¶
type WildcardStore[T any] struct { // contains filtered or unexported fields }
WildcardStore utility to persist and search items using wildcards. Used for channels, topics and events
IMPORTANT: It is not safe for insertion in a concurrent scenario. Items should only persist during system startup.
func (*WildcardStore[T]) Insert ¶
func (s *WildcardStore[T]) Insert(keyPattern string, value T) error
func (*WildcardStore[T]) Match ¶
func (s *WildcardStore[T]) Match(key string) (out T)
Match returns the value corresponding to the first occurrence of the keyPattern that matches the given key
func (*WildcardStore[T]) MatchAll ¶
func (s *WildcardStore[T]) MatchAll(key string) []T
MatchAll returns all existing values that match the given key
Click to show internal directories.
Click to hide internal directories.