prometheus/discovery/targetgroup
Robert Fratto 516579a97e
discovery/targetgroup: support marshaling to JSON (#10229)
* discovery/targetgroup: support marshaling to JSON

targetgroup.Group is able to be marshaled to and from YAML, but not with
JSON. JSON is used for the http_sd API representation, so users
implementing the API were required to implement their own type which is
expected by the JSON unmarshaler.

Signed-off-by: Robert Fratto <robertfratto@gmail.com>

* fix lint error

Signed-off-by: Robert Fratto <robertfratto@gmail.com>

* Update discovery/targetgroup/targetgroup.go

Co-authored-by: Julius Volz <julius.volz@gmail.com>
Signed-off-by: Robert Fratto <robertfratto@gmail.com>

* s/Json/JSON

Signed-off-by: Robert Fratto <robertfratto@gmail.com>

Co-authored-by: Julius Volz <julius.volz@gmail.com>
2022-02-02 17:20:18 +01:00
..
targetgroup.go discovery/targetgroup: support marshaling to JSON (#10229) 2022-02-02 17:20:18 +01:00
targetgroup_test.go discovery/targetgroup: support marshaling to JSON (#10229) 2022-02-02 17:20:18 +01:00