7#include "CivetServer.h"
9#include "prometheus/collectable.h"
10#include "prometheus/registry.h"
12namespace prometheus::detail {
17 explicit Endpoint(CivetServer& server, std::string uri);
20 Endpoint(
const Endpoint&) =
delete;
21 Endpoint(Endpoint&&) =
delete;
22 Endpoint& operator=(
const Endpoint&) =
delete;
23 Endpoint& operator=(Endpoint&&) =
delete;
25 void RegisterCollectable(
const std::weak_ptr<Collectable>& collectable);
27 std::function<
bool(
const std::string&,
const std::string&)> authCB,
28 const std::string& realm);
29 void RemoveCollectable(
const std::weak_ptr<Collectable>& collectable);
31 const std::string& GetURI()
const;
35 const std::string uri_;
37 std::shared_ptr<Registry> endpoint_registry_;
38 std::unique_ptr<MetricsHandler> metrics_handler_;
39 std::unique_ptr<BasicAuthHandler> auth_handler_;