Kagome
Polkadot Runtime Engine in C++17
endpoint.hpp
Go to the documentation of this file.
1 
6 #ifndef KAGOME_TELEMETRY_ENDPOINT_HPP
7 #define KAGOME_TELEMETRY_ENDPOINT_HPP
8 
9 #include "common/uri.hpp"
10 
11 namespace kagome::telemetry {
12 
18  public:
19  TelemetryEndpoint(common::Uri endpoint_uri, uint8_t verbosity_level)
20  : uri_{std::move(endpoint_uri)}, verbosity_level_{verbosity_level} {};
21 
22  const common::Uri &uri() const {
23  return uri_;
24  };
25 
26  uint8_t verbosity() {
27  return verbosity_level_;
28  };
29 
30  bool operator==(const TelemetryEndpoint &other) const {
31  return uri_.to_string() == other.uri_.to_string()
33  }
34 
35  bool operator!=(const TelemetryEndpoint &other) const {
36  return not operator==(other);
37  }
38 
39  private:
42  };
43 } // namespace kagome::telemetry
44 
45 #endif // KAGOME_TELEMETRY_ENDPOINT_HPP
std::string to_string() const
Definition: uri.cpp:12
bool operator==(const TelemetryEndpoint &other) const
Definition: endpoint.hpp:30
TelemetryEndpoint(common::Uri endpoint_uri, uint8_t verbosity_level)
Definition: endpoint.hpp:19
const common::Uri & uri() const
Definition: endpoint.hpp:22
bool operator!=(const TelemetryEndpoint &other) const
Definition: endpoint.hpp:35