ark::local_storage::LocalStorageSubscriber
Defined in header “ark/local_storage/local_storage_subscriber.hh”.
Subscribers to the local storage stage running at the given namespace, and will allow you to receive updates when particular keys are updated. This is useful for dynamically updating configuration that is aimed to be written to disk.
Also handles doing an initial read of said configuration value if desired, to initialize on startup.
Typedefs
- using Callback = std::function< void(LocalStorageSubscriberUpdate)>
Methods
- void add_subscriber(pipeline::StageInterface & interface, const std::string & local_storage_stage_name, const std::string & storage_namespace, const std::string & key_name, const Callback & callback)
Invoked to add a new subscription to a particular key within a local storage channel namespace. Provide the name of the local storage stage along with the key you want to monitor.