#include <userver/storages/secdist/secdist.hpp>
Client to retrieve credentials from the components::Secdist and to subscribe to their updates.
Definition at line 115 of file secdist.hpp.
Public Member Functions | |
Secdist (SecdistConfig::Settings settings) | |
const storages::secdist::SecdistConfig & | Get () const |
rcu::ReadablePtr< storages::secdist::SecdistConfig > | GetSnapshot () const |
template<typename Class > | |
concurrent::AsyncEventSubscriberScope | UpdateAndListen (Class *obj, std::string_view name, void(Class::*func)(const storages::secdist::SecdistConfig &secdist)) |
bool | IsPeriodicUpdateEnabled () const |
const storages::secdist::SecdistConfig & storages::secdist::Secdist::Get | ( | ) | const |
Returns secdist data loaded on service start. Does not support secdist updating during service work.
rcu::ReadablePtr< storages::secdist::SecdistConfig > storages::secdist::Secdist::GetSnapshot | ( | ) | const |
Returns fresh secdist data (from last update). Supports secdist updating during service work.
concurrent::AsyncEventSubscriberScope storages::secdist::Secdist::UpdateAndListen | ( | Class * | obj, |
std::string_view | name, | ||
void(Class::*)(const storages::secdist::SecdistConfig &secdist) | func ) |
Subscribes to secdist updates using a member function, named OnSecdistUpdate
by convention. Also immediately invokes the function with the current secdist data.
Definition at line 151 of file secdist.hpp.