24 explicit Exposer(
const std::string& bind_address,
25 const std::size_t num_threads = 2,
26 const CivetCallbacks* callbacks =
nullptr);
27 explicit Exposer(std::vector<std::string> options,
28 const CivetCallbacks* callbacks =
nullptr);
36 void RegisterCollectable(
const std::weak_ptr<Collectable>& collectable,
37 const std::string& uri = std::string(
"/metrics"));
40 std::function<
bool(
const std::string&,
const std::string&)> authCB,
41 const std::string& realm =
"Prometheus-cpp Exporter",
42 const std::string& uri = std::string(
"/metrics"));
44 void RemoveCollectable(
const std::weak_ptr<Collectable>& collectable,
45 const std::string& uri = std::string(
"/metrics"));
47 std::vector<int> GetListeningPorts()
const;
50 detail::Endpoint& GetEndpointForUri(
const std::string& uri);
52 std::unique_ptr<CivetServer> server_;
53 std::vector<std::unique_ptr<detail::Endpoint>> endpoints_;