Expand description
Nom based line parser for the exposition format specified at Prometheus documentation
Structs§
- Comment
- Represents parsed
type
orhelp
comments for eachmetric
. See examples at try_read_comment for more details. - Label
List - List of labels for a SampleData. See examples at try_read_sample for more details.
- Sample
Data - Represents a parsed metric sample. See examples at try_read_sample for more details.
Enums§
- Comment
Type - If it is a
type
orhelp
comment. More details: comments, help text, and type information.
Functions§
- try_
read_ comment - Tries to parse a
&str
line as a comment and returnsComment
if it succeeds. - try_
read_ sample - Tries to parse a
&str
line as a sample and returnsSampleData
containg the metric name, labels and value if it succeeds.