Add helper method to config.Secret to load a file

LoadFromFile is a very small helper to avoid repeating this code over
and over again.

This is related to prometheus/prometheus#8551

Signed-off-by: Marcelo E. Magallon <marcelo.magallon@grafana.com>
6 files changed
tree: 22e747076af561f9bc663bbff6363e783a5e17d7
  1. .circleci/
  2. .github/
  3. config/
  4. expfmt/
  5. internal/
  6. model/
  7. promlog/
  8. route/
  9. server/
  10. sigv4/
  11. version/
  12. .gitignore
  13. CODE_OF_CONDUCT.md
  14. CONTRIBUTING.md
  15. go.mod
  16. go.sum
  17. LICENSE
  18. MAINTAINERS.md
  19. Makefile
  20. Makefile.common
  21. NOTICE
  22. README.md
  23. SECURITY.md
README.md

Common

circleci

This repository contains Go libraries that are shared across Prometheus components and libraries. They are considered internal to Prometheus, without any stability guarantees for external usage.

  • config: Common configuration structures
  • expfmt: Decoding and encoding for the exposition format
  • model: Shared data structures
  • promlog: A logging wrapper around go-kit/log
  • route: A routing wrapper around httprouter using context.Context
  • server: Common servers
  • version: Version information and metrics