Move signal handling loop to common.
This commit is contained in:
1 parent
f5dfefef75
commit
590a151bde
5 files changed
+8
-34
No files matched your search
@@ -5,6 +5,7 @@ import (
|
||||
"os"
|
||||
"strings"
|
||||
|
||||
"github.com/weaveworks/common/signals"
|
||||
"github.com/weaveworks/docker/pkg/mflag"
|
||||
"github.com/weaveworks/weave/common"
|
||||
"github.com/weaveworks/weave/common/mflagext"
|
||||
@@ -79,5 +80,5 @@ func main() {
|
||||
p.AttachExistingContainers()
|
||||
go p.Serve(listeners)
|
||||
go p.ListenAndServeStatus("/home/weave/status.sock")
|
||||
common.SignalHandlerLoop()
|
||||
signals.SignalHandlerLoop(common.Log)
|
||||
}
|
||||
+2
-1
@@ -13,6 +13,7 @@ import (
|
||||
|
||||
"github.com/gorilla/mux"
|
||||
"github.com/pkg/profile"
|
||||
"github.com/weaveworks/common/signals"
|
||||
"github.com/weaveworks/docker/pkg/mflag"
|
||||
"github.com/weaveworks/mesh"
|
||||
|
||||
@@ -361,7 +362,7 @@ func main() {
|
||||
go listenAndServeHTTP(statusAddr, statusMux)
|
||||
}
|
||||
|
||||
common.SignalHandlerLoop(router)
|
||||
signals.SignalHandlerLoop(common.Log, router)
|
||||
}
|
||||
|
||||
func options() map[string]string {
|
||||
|
||||
Reference in new issue
Block a user