Content below ported from scratch notes. Needs further thought/refinement.
Use existing functionality from the atc0005/check-cert and atc0005/check-vmware projects as inspiration.
Accept an optional map of error to string values which map a collection of advice items to specific errors.
Provide a default map collection that can be returned by a package function, modified by the user and then provided to the AnnotateErrors function.
A standalone function should accept a pointer to nagios.Plugin so that the errors collection can be modified in place like the annotateErrors function from those projects currently does.
A method can make use of this standalone function to provide in place updates to the error collection associated with the nagios.Plugin value.
Content below ported from scratch notes. Needs further thought/refinement.
Use existing functionality from the
atc0005/check-cert
andatc0005/check-vmware
projects as inspiration.Accept an optional map of
error
tostring
values which map a collection of advice items to specific errors.Provide a default map collection that can be returned by a package function, modified by the user and then provided to the
AnnotateErrors
function.A standalone function should accept a pointer to
nagios.Plugin
so that the errors collection can be modified in place like theannotateErrors
function from those projects currently does.A method can make use of this standalone function to provide in place updates to the error collection associated with the
nagios.Plugin
value.