mirror of
https://github.com/RGBCube/serenity
synced 2025-05-21 17:05:11 +00:00

This patch adds a Config::Listener abstract class that anyone can inherit from and receive notifications when configuration values change. We don't yet monitor file system changes, so these only work for changes made by ConfigServer itself. In order to receive these notifications, clients must monitor the domain by calling monitor_domain(). Only pledged domains can be monitored. Note that the client initiating the change does not get notified.
14 lines
609 B
Text
14 lines
609 B
Text
endpoint ConfigServer
|
|
{
|
|
pledge_domains(Vector<String> domains) =|
|
|
|
|
monitor_domain(String domain) =|
|
|
|
|
read_string_value(String domain, String group, String key) => (Optional<String> value)
|
|
read_i32_value(String domain, String group, String key) => (Optional<i32> value)
|
|
read_bool_value(String domain, String group, String key) => (Optional<bool> value)
|
|
|
|
write_string_value(String domain, String group, String key, String value) =|
|
|
write_i32_value(String domain, String group, String key, i32 value) =|
|
|
write_bool_value(String domain, String group, String key, bool value) =|
|
|
}
|