| 1234567891011121314151617181920212223242526272829303132333435 | #pragma once#include <atomic>#include <cstdint>#include <memory>#include <string>#include <vector>#include "prometheus/collectable.h"#include "prometheus/registry.h"class CivetServer;namespace prometheus {namespace detail {class MetricsHandler;}  // namespace detailclass Exposer { public:  explicit Exposer(const std::string& bind_address,                   const std::string& uri = std::string("/metrics"));  ~Exposer();  void RegisterCollectable(const std::weak_ptr<Collectable>& collectable); private:  std::unique_ptr<CivetServer> server_;  std::vector<std::weak_ptr<Collectable>> collectables_;  std::shared_ptr<Registry> exposer_registry_;  std::unique_ptr<detail::MetricsHandler> metrics_handler_;  std::string uri_;};}  // namespace prometheus
 |