Functions | |
const std::string & | getAsciiLogo () |
Get the ASCII logo string. | |
std::string | loadBuildTimestamp (const std::filesystem::path &path) |
std::string | currentTimestamp () |
asio::awaitable< void > | watchdog (std::chrono::steady_clock::time_point &deadline) |
Suspends the coroutine until the given deadline is reached. | |
asio::awaitable< void > | ensureOnStrand (const asio::strand< asio::io_context::executor_type > &strand) |
std::string | escapeSolSrcQuotes (const std::string &json) |
template<class DataT , class ChildT , template< typename... > class ChildListT> | |
std::vector< std::string > | topologicalSort (const absl::flat_hash_map< std::string, DataT > &data, std::function< ChildListT< ChildT >(const DataT &)> get_childreen, std::function< std::string(const ChildT &)> get_child_name) |
std::string dcn::utils::currentTimestamp | ( | ) |
asio::awaitable< void > dcn::utils::ensureOnStrand | ( | const asio::strand< asio::io_context::executor_type > & | strand | ) |
std::string dcn::utils::escapeSolSrcQuotes | ( | const std::string & | json | ) |
const std::string & dcn::utils::getAsciiLogo | ( | ) |
Get the ASCII logo string.
std::string dcn::utils::loadBuildTimestamp | ( | const std::filesystem::path & | path | ) |
std::vector< std::string > dcn::utils::topologicalSort | ( | const absl::flat_hash_map< std::string, DataT > & | data, |
std::function< ChildListT< ChildT >(const DataT &)> | get_childreen, | ||
std::function< std::string(const ChildT &)> | get_child_name | ||
) |
asio::awaitable< void > dcn::utils::watchdog | ( | std::chrono::steady_clock::time_point & | deadline | ) |
Suspends the coroutine until the given deadline is reached.
deadline | The point in time when the coroutine should be resumed |
This function is used to implement a watchdog like behavior in the server. It is used for example in the listening function to periodically check if the server should be shut down.