Commit Graph

14 Commits

Author SHA1 Message Date
Alessandro Ros
659f19f8bb enable errcheck (#2201)
Some checks reported warnings
lint / code (push) Has been cancelled
lint / mod-tidy (push) Has been cancelled
lint / apidocs (push) Has been cancelled
test / test64 (push) Has been cancelled
test / test32 (push) Has been cancelled
test / test_highlevel (push) Has been cancelled
2023-08-13 16:38:23 +02:00
Alessandro Ros
89ebc83993 update golangci-lint (#1870) 2023-05-28 17:18:16 +02:00
Alessandro Ros
adbd4b7296 fix compatibility between confwatcher and legacy configuration file (#1642)
Some checks failed
apidocs
code
mod-tidy
test32
test64
test_highlevel
2023-04-01 20:06:43 +02:00
aler9
f1fb00b80f update golangci-lint 2022-09-17 21:19:45 +02:00
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