Add an abstraction layer around configuration reloading
Review Request #9841 — Created March 27, 2018 and submitted
touch config.jsonwould result in the server
reloading, but if the configuratino file was overwritten (say by a text
editor), rb-gateway would crash. Now we have a
abstraction that wraps
fsnotifyto (1) wait for the file to be written
and (2) re-watch the file. It also provides a utility to force reload
the configuration (which is triggered by
- Ran unit tests.
touch config.jsonand saw the config reloaded.
config.jsonand saw the config reloaded (and rb-gateway did
kill -sHUP (pgrep rb-gateway)and saw the config reloaded.