Documentation ¶
Overview ¶
Package queues contains helper functions for manipulation of queue names.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EscapeComponent ¶
EscapeComponent adds backslash in front of backslash and forward slash.
func PathComponents ¶
PathComponents returns a list of the path components in this queue name. It basically assumes that the name is structured like a POSIX file path, including escaping of / where needed. It includes the beginning '/' as part of the component, if it has one. A path ending in / will have a final component of just that character.
func PathParams ¶
PathParams returns a map from strings to slices of values. It looks through the queue name, assuing that it is basically structured like a path, with some `/key=value/` components, and extracts those key/value pairs into what is essentially a multimap.
Note that `/key=` is the criterion for search. If the key=value does not start with a slash, it is not picked up. This allows for escaping of the / character, so `\/` cannot start one of these path components.
func TryAddNamespace ¶
TryAddNamespace attempts to add the given namespace to the queue name. If there is already a namespace, it gives up. Otherwise it prepends with /ns=namespace/.
Types ¶
This section is empty.