dirwatch: one loop that watches a directory, for rules and lookup (closes #429)
check / check (push) Successful in 4m35s
check / check (push) Successful in 4m35s
rules and lookup each had the same loop: watch the directory, start a timer at once, restart it at each change that counts, read again when it fires. It now lives once in internal/dirwatch, with its quiet time and its tests. Each package keeps its own log messages, its readAgain, and its test for which changes count. internal/state keeps its own copy. Model: opus-5-5
This commit was merged in pull request #458.
This commit is contained in:
1 parent
b2b1716907
commit
06faf0877c
8 files changed
+334
-403
No files matched your search
@@ -906,6 +906,8 @@ stops the running process (see [`docs/state-files.md`](docs/state-files.md)).
|
||||
`internal/coreruleset`, `internal/geojs`, `internal/lookup`,
|
||||
`internal/reputation`, `internal/routewatch`, `internal/anomaly` and
|
||||
`internal/alerts`: one check or source each.
|
||||
- `internal/dirwatch`: watches a directory, so that `internal/rules` and
|
||||
`internal/lookup` read their files again when they change.
|
||||
- `internal/state`: the state and cache files.
|
||||
- `internal/requestlog`: the request log.
|
||||
- `internal/processlog`: the process's own messages.
|
||||
|
||||
Reference in new issue
Block a user