client_golang/internal
Manuel Rüger f08b10c5bc
feat: Support zstd compression (#1496)
* feat: Support zstd encoding

This allows endpoints to respond with zstd compressed metric data, if
the requester supports it.

I have imported a content-encoding parser from
https://github.com/golang/gddo which is an archived repository to
support different content-encoding headers.

Signed-off-by: Manuel Rüger <manuel@rueg.eu>

* Update prometheus/promhttp/http.go

Co-authored-by: Bartlomiej Plotka <bwplotka@gmail.com>
Signed-off-by: Manuel Rüger <manuel@rueg.eu>

* Update prometheus/promhttp/http.go

Co-authored-by: Bartlomiej Plotka <bwplotka@gmail.com>
Signed-off-by: Manuel Rüger <manuel@rueg.eu>

* Update prometheus/promhttp/http.go

Co-authored-by: Bartlomiej Plotka <bwplotka@gmail.com>
Signed-off-by: Manuel Rüger <manuel@rueg.eu>

* Integrate review comments

* String typed enum

Signed-off-by: Manuel Rüger <manuel@rueg.eu>

* Test with gzip compression

Signed-off-by: Manuel Rüger <manuel@rueg.eu>

* Update prometheus/promhttp/http.go

Co-authored-by: Bartlomiej Plotka <bwplotka@gmail.com>
Signed-off-by: Manuel Rüger <manuel@rueg.eu>

* Reorder error handling

Signed-off-by: Manuel Rüger <manuel@rueg.eu>

* Apply suggestions from code review

Co-authored-by: Bartlomiej Plotka <bwplotka@gmail.com>
Signed-off-by: Manuel Rüger <manuel@rueg.eu>

* Include review suggestions

Signed-off-by: Manuel Rüger <manuel@rueg.eu>

---------

Signed-off-by: Manuel Rüger <manuel@rueg.eu>
Co-authored-by: Bartlomiej Plotka <bwplotka@gmail.com>
2024-06-07 15:56:19 +01:00
..
github.com/golang/gddo feat: Support zstd compression (#1496) 2024-06-07 15:56:19 +01:00