23#include <condition_variable>
61 uint64_t
Schedule(std::chrono::milliseconds delay, std::function<
void()> callback);
100 std::chrono::steady_clock::time_point fire_at;
101 std::function<void()> callback;
105 std::condition_variable cv_;
106 std::vector<Task> tasks_;
107 uint64_t next_id_ = 1;
108 bool shutdown_ =
false;
A process-global scheduler for delayed token refresh tasks.
Definition token_refresh_scheduler.h:47
uint64_t Schedule(std::chrono::milliseconds delay, std::function< void()> callback)
Schedule a callback to run after a delay.
TokenRefreshScheduler()
Construct a scheduler (prefer Instance() for production use).
static TokenRefreshScheduler & Instance()
Get the global singleton instance.
void Cancel(uint64_t handle)
Cancel a previously scheduled task.
void Shutdown()
Shutdown the scheduler, cancelling all pending tasks.
Define symbol visibility macros for the REST catalog library.
REST catalog authentication APIs.
Definition auth_manager.h:34