diff options
Diffstat (limited to 'src/web_service/telemetry_json.h')
| -rw-r--r-- | src/web_service/telemetry_json.h | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/src/web_service/telemetry_json.h b/src/web_service/telemetry_json.h index 9a2aaa2c8..93371414a 100644 --- a/src/web_service/telemetry_json.h +++ b/src/web_service/telemetry_json.h | |||
| @@ -4,10 +4,8 @@ | |||
| 4 | 4 | ||
| 5 | #pragma once | 5 | #pragma once |
| 6 | 6 | ||
| 7 | #include <array> | ||
| 8 | #include <chrono> | 7 | #include <chrono> |
| 9 | #include <string> | 8 | #include <string> |
| 10 | #include <json.hpp> | ||
| 11 | #include "common/telemetry.h" | 9 | #include "common/telemetry.h" |
| 12 | 10 | ||
| 13 | namespace WebService { | 11 | namespace WebService { |
| @@ -39,20 +37,8 @@ public: | |||
| 39 | void Complete() override; | 37 | void Complete() override; |
| 40 | 38 | ||
| 41 | private: | 39 | private: |
| 42 | nlohmann::json& TopSection() { | 40 | struct Impl; |
| 43 | return sections[static_cast<u8>(Telemetry::FieldType::None)]; | 41 | std::unique_ptr<Impl> impl; |
| 44 | } | ||
| 45 | |||
| 46 | template <class T> | ||
| 47 | void Serialize(Telemetry::FieldType type, const std::string& name, T value); | ||
| 48 | |||
| 49 | void SerializeSection(Telemetry::FieldType type, const std::string& name); | ||
| 50 | |||
| 51 | nlohmann::json output; | ||
| 52 | std::array<nlohmann::json, 7> sections; | ||
| 53 | std::string host; | ||
| 54 | std::string username; | ||
| 55 | std::string token; | ||
| 56 | }; | 42 | }; |
| 57 | 43 | ||
| 58 | } // namespace WebService | 44 | } // namespace WebService |