Commit Graph

10 Commits

Author SHA1 Message Date
aler9
90e24b79cb cleanup 2021-08-01 16:58:46 +02:00
aler9
c986cb254b implement RTSP sessions (#149) 2021-05-07 23:07:31 +02:00
aler9
205284829d confwatcher: add additional tests 2021-01-13 21:57:09 +01:00
aler9
8e97f4ff61 confwatcher: fail if configuration file doesn't exist 2021-01-13 21:57:09 +01:00
Florian Vallée
f5dc53e0f2 improve config file watcher to support k8s configmap reloads
The config file watcher assumed a simple configuration where the
existing configuration file is overwritten by a text editor.

In practice this does not detect some more complex configuration change
scenarios such as :
* The configuration file is behind a symlink and the symlink is updated
* The configuration file is behind a double symlink (k8s configmap
  update)
* The configuration file is not updated but removed the re-created

In order to fix these cases :
* Watch the configuration file parent directory instead of the file
itself, this lets us grab events event if the file was removed and a new
file is used.
* In addition to read/write event matching, watch for any change in
the configuration file path. This handles the symlink case where the
file itself hasn't changed but its location did

v2:
- apply gofmt
2021-01-13 21:57:09 +01:00
aler9
05e835e48c confwatcher: add tests 2021-01-13 20:48:57 +01:00
aler9
18fe2d057c print a warn message when the configuration file is not found 2020-12-06 22:29:56 +01:00
aler9
0f11dd5c71 fix hot reloading of configuration on macOS and with text editors that deletes and recreates the configuration file 2020-11-26 21:44:16 +01:00
aler9
58fe1cfe77 add docs 2020-11-05 12:37:16 +01:00
aler9
5facab1a48 move subpackages into internal/ 2020-11-01 22:56:56 +01:00