Move Prometheus result types ('vector', 'matrix', ...) to constants.
Description
Now that the parsing is more explicit, we should move our Prometheus result types ('vector', 'matrix', ...) to constants.
Why work on this?
General code hygiene, no big urgency.
Original Discussion
The following discussion from !34376 (merged) should be addressed:
-
@ekigbo started a discussion: (+1 comment) Nitpick: Do we compare against these options in other places? It might be good to move them into constants.
Note: I always feel funny about
else if
s with no finalelse
, perhaps aswitch
could work🤔 , but it looks like this is covered with tests for thematrix
type anyway.