pulsar-client-cpp
Loading...
Searching...
No Matches
ServiceInfo.h
1
19#ifndef PULSAR_SERVICE_INFO_H_
20#define PULSAR_SERVICE_INFO_H_
21
22#include <pulsar/Authentication.h>
23
24#include <optional>
25#include <string>
26
27namespace pulsar {
28
33class PULSAR_PUBLIC ServiceInfo final {
34 public:
35 ServiceInfo(std::string serviceUrl, AuthenticationPtr authentication = AuthFactory::Disabled(),
36 std::optional<std::string> tlsTrustCertsFilePath = std::nullopt);
37
38 auto& serviceUrl() const noexcept { return serviceUrl_; }
39 auto useTls() const noexcept { return useTls_; }
40 auto& authentication() const noexcept { return authentication_; }
41 auto& tlsTrustCertsFilePath() const noexcept { return tlsTrustCertsFilePath_; }
42
43 bool operator==(const ServiceInfo& other) const noexcept {
44 return serviceUrl_ == other.serviceUrl_ && useTls_ == other.useTls_ &&
45 authentication_ == other.authentication_ &&
46 tlsTrustCertsFilePath_ == other.tlsTrustCertsFilePath_;
47 }
48
49 private:
50 std::string serviceUrl_;
51 bool useTls_;
52 AuthenticationPtr authentication_;
53 std::optional<std::string> tlsTrustCertsFilePath_;
54};
55
56} // namespace pulsar
57#endif
Definition Authentication.h:31