23 #include <zmqpp/curve.hpp> 28 const std::string &pubkey)
33 INFO(
"Creating GetRemoteConfigVersion task. Guid = " <<
get_guid());
39 zmqpp::socket sock(ctx, zmqpp::socket_type::dealer);
40 auto kp = zmqpp::curve::generate_keypair();
42 sock.set(zmqpp::socket_option::curve_secret_key, kp.secret_key);
43 sock.set(zmqpp::socket_option::curve_public_key, kp.public_key);
44 sock.set(zmqpp::socket_option::curve_server_key,
pubkey_);
45 sock.set(zmqpp::socket_option::linger, 0);
48 sock.send(
"CONFIG_VERSION");
50 zmqpp::message response;
55 if (p.has_input(sock))
57 sock.receive(response);
59 INFO(
"Remote configuration version = " << config_version_);
62 ERROR(
"Failed to receive response from remote server in due time");
const std::string & get_guid() const
This is the header file for a generated source file, GitSHA1.cpp.
static constexpr const int timeout
virtual bool do_run() override
GetRemoteConfigVersion(const std::string &endpoint, const std::string &pubkey)