Closed F-TD5X closed 4 years ago
Oh I forgot to rewatch changed file path. Hold on there.
Maybe it would be better only support something like "overture reloadconfig" and let the watcher outside ?
You mean using some way to receive a overture reloadconfig
signal? I don't know if golang has some cross platform way, or we have to open a port to do this communite.
Yeah, just like overture would like to offer some apis for configuration change requests. File watcher is too heavy for an application software I suppose.
npipe
and winio
cause unknown bugs on my windows vm, I gave up IPC, and use http to serve /reload
request.
Merging #236 into master will increase coverage by
0.15%
. The diff coverage is88.04%
.
@@ Coverage Diff @@
## master #236 +/- ##
==========================================
+ Coverage 49.69% 49.84% +0.15%
==========================================
Files 10 13 +3
Lines 489 660 +171
==========================================
+ Hits 243 329 +86
- Misses 200 283 +83
- Partials 46 48 +2
Impacted Files | Coverage Δ | |
---|---|---|
core/outbound/dispatcher.go | 57.29% <0.00%> (ø) |
|
main/main.go | 0.00% <0.00%> (ø) |
|
core/common/ipset.go | 92.94% <92.94%> (ø) |
|
core/common/common.go | 17.94% <100.00%> (ø) |
|
core/common/edns.go | 0.00% <0.00%> (ø) |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update f51edc8...49bdf68. Read the comment docs.
sorry for delay for I have not received notificate email...
Merged. Thanks!
71
I can't wait LOL, so I tried to impletment it myself. I doesn't know more about Golang, so there might be some dirty code in this PR.
core/inbound/server.go
, manually create servers for make them closeable.core/init.go
tocore/control.go
, and add some control code, config watcher code also wrote in this file.config.Config
save it's path, for easy reload.