]> git.proxmox.com Git - ceph.git/blame - ceph/src/jaegertracing/opentelemetry-cpp/third_party/prometheus-cpp/push/src/curl_wrapper.h
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / jaegertracing / opentelemetry-cpp / third_party / prometheus-cpp / push / src / curl_wrapper.h
CommitLineData
1e59de90
TL
1#include <curl/curl.h>
2
3#include <mutex>
4#include <string>
5
6#include "prometheus/detail/http_method.h"
7
8namespace prometheus {
9namespace detail {
10
11class CurlWrapper {
12 public:
13 CurlWrapper(const std::string& username, const std::string& password);
14
15 CurlWrapper(const CurlWrapper&) = delete;
16 CurlWrapper(CurlWrapper&&) = delete;
17 CurlWrapper& operator=(const CurlWrapper&) = delete;
18 CurlWrapper& operator=(CurlWrapper&&) = delete;
19
20 ~CurlWrapper();
21
22 int performHttpRequest(HttpMethod method, const std::string& uri,
23 const std::string& body);
24
25 private:
26 CURL* curl_;
27 std::string auth_;
28 std::mutex mutex_;
29};
30
31} // namespace detail
32} // namespace prometheus