Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CompileREs ¶
CompileREs compiles a list of regexps, returning an error and the empty list in case one of the regexps fails.
func MergeREs ¶
MergeREs merges together a list of regexps (this will match any pattern that matches at least one of the input regexps). the good news is that '^(^value$)$' will match 'value', so we can use the output of this function and give it to the collectors of windows_exporter and node_exporter (had this property been false, it would have been difficult to merge them, given the way the regexps are processed in windows_exporter: https://github.com/prometheus-community/windows_exporter/blob/21a02c4fbec4304f883ed7957bd81045d2f0c133/collector/logical_disk.go#L153)
func ReFromPathPrefix ¶
ReFromPathPrefix returns a regular expression matching any path prefix in the input. By path-prefix, we means that the path-prefix "/mnt" will match "/mnt", "/mnt/disk" but not "/mnt-disk" Only "/" is supported (e.g. only unix).
func ReFromPrefix ¶
ReFromPrefix returns a regular expression matching any prefixes in the input. e.g. ReFromPrefixes("eth"}) will match eth, eth0, ...
Types ¶
This section is empty.