EtcdStorage
- class savant.parameter_storage.EtcdStorage(**kwargs)
Manages cached access to value from etcd storage.
- register_parameter(name, default_value=None)
Registers static parameter.
- register_dynamic_parameter(name, default_value=None, on_change=None)
Prepare the manager to be able to return some value for a given name. Try to get value from storage, fallback to default in case of fail. Try to add watch for name.
- Parameters:
name (str) – Parameter name in etcd.
default_value (Optional[Any]) – Default value for a given name, if skipped and storage request failed then subsequent __getitem__ calls may fail.
on_change (Optional[Callable]) – Additional user specified action to perform on decoded event value from watch response.