web_service: stop using std::future + callback style async
This commit is contained in:
parent
0a4d338ffa
commit
77c1f647cb
23 changed files with 329 additions and 457 deletions
|
@ -5,7 +5,6 @@
|
|||
#pragma once
|
||||
|
||||
#include <array>
|
||||
#include <future>
|
||||
#include <string>
|
||||
#include "common/announce_multiplayer_room.h"
|
||||
#include "common/telemetry.h"
|
||||
|
@ -19,9 +18,8 @@ namespace WebService {
|
|||
*/
|
||||
class TelemetryJson : public Telemetry::VisitorInterface {
|
||||
public:
|
||||
TelemetryJson(const std::string& endpoint_url, const std::string& username,
|
||||
const std::string& token)
|
||||
: endpoint_url(endpoint_url), username(username), token(token) {}
|
||||
TelemetryJson(const std::string& host, const std::string& username, const std::string& token)
|
||||
: host(host), username(username), token(token) {}
|
||||
~TelemetryJson() = default;
|
||||
|
||||
void Visit(const Telemetry::Field<bool>& field) override;
|
||||
|
@ -53,10 +51,9 @@ private:
|
|||
|
||||
nlohmann::json output;
|
||||
std::array<nlohmann::json, 7> sections;
|
||||
std::string endpoint_url;
|
||||
std::string host;
|
||||
std::string username;
|
||||
std::string token;
|
||||
std::future<Common::WebResult> future;
|
||||
};
|
||||
|
||||
} // namespace WebService
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue