Document the code a bit more.
This commit is contained in:
parent
1e8a6b282d
commit
d39bb4793c
@ -35,6 +35,12 @@ var (
|
|||||||
nil, nil)
|
nil, nil)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// Parses the output of Postfix's 'showq' command and turns it into metrics.
|
||||||
|
//
|
||||||
|
// Recent versions of Postfix actually make this easy, because they have
|
||||||
|
// a new 'showq_json' command. Unfortunately, we cannot assume that
|
||||||
|
// versions of Postfix that are in use support this, so just parse the
|
||||||
|
// textual format.
|
||||||
func CollectShowqFromReader(file io.Reader, ch chan<- prometheus.Metric) error {
|
func CollectShowqFromReader(file io.Reader, ch chan<- prometheus.Metric) error {
|
||||||
scanner := bufio.NewScanner(file)
|
scanner := bufio.NewScanner(file)
|
||||||
scanner.Split(bufio.ScanLines)
|
scanner.Split(bufio.ScanLines)
|
||||||
|
Loading…
Reference in New Issue
Block a user