Leosac  0.7.0
Leosac::Tasks::GetRemoteConfigVersion Class Reference

Fetch the configuration version of the master server. More...

#include <GetRemoteConfigVersion.hpp>

+ Inheritance diagram for Leosac::Tasks::GetRemoteConfigVersion:
+ Collaboration diagram for Leosac::Tasks::GetRemoteConfigVersion:

Public Member Functions

 GetRemoteConfigVersion (const std::string &endpoint, const std::string &pubkey)
- Public Member Functions inherited from Leosac::Tasks::Task
 Task ()
virtual ~Task ()
 Task (const Task &)=delete
 Task (Task &&)=delete
Taskoperator= (const Task &)=delete
Taskoperator= (Task &&)=delete
bool is_complete () const
 Has the tasks completed its execution. More...
void wait ()
 Instead of spinlocking over is_complete() one can call wait() to hum... More...
void run ()
bool succeed () const
std::exception_ptr get_exception () const
template<typename Callback >
void set_on_completion (Callback c)
 Set a callback that will be invoked when the tasks is completed, no matter if it succeeded or not. More...
template<typename Callback >
void set_on_success (Callback c)
 Set a callback that will be invoked if and when the task succeed. More...
template<typename Callback >
void set_on_failure (Callback c)
 Set a callback that will be invoked if and when the task fails. More...
const std::string & get_guid () const

Public Attributes

uint64_t config_version_

Static Public Attributes

static constexpr const int timeout = 5000

Private Member Functions

virtual bool do_run () override

Private Attributes

std::string endpoint_
std::string pubkey_

Detailed Description

Fetch the configuration version of the master server.

This tasks should be scheduled in a pool thread.

Definition at line 34 of file GetRemoteConfigVersion.hpp.

Constructor & Destructor Documentation

◆ GetRemoteConfigVersion()

Tasks::GetRemoteConfigVersion::GetRemoteConfigVersion ( const std::string &  endpoint,
const std::string &  pubkey 

Definition at line 27 of file GetRemoteConfigVersion.cpp.

Member Function Documentation

◆ do_run()

bool Tasks::GetRemoteConfigVersion::do_run ( )

Implements Leosac::Tasks::Task.

Definition at line 36 of file GetRemoteConfigVersion.cpp.

Member Data Documentation

◆ config_version_

uint64_t Leosac::Tasks::GetRemoteConfigVersion::config_version_

Definition at line 39 of file GetRemoteConfigVersion.hpp.

◆ endpoint_

std::string Leosac::Tasks::GetRemoteConfigVersion::endpoint_

Definition at line 46 of file GetRemoteConfigVersion.hpp.

◆ pubkey_

std::string Leosac::Tasks::GetRemoteConfigVersion::pubkey_

Definition at line 47 of file GetRemoteConfigVersion.hpp.

◆ timeout

constexpr const int Leosac::Tasks::GetRemoteConfigVersion::timeout = 5000

Definition at line 41 of file GetRemoteConfigVersion.hpp.

The documentation for this class was generated from the following files: