[#10] health: Drop unused
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
parent
21841df9f7
commit
731f2229c0
1 changed files with 2 additions and 8 deletions
10
health.go
10
health.go
|
@ -5,7 +5,6 @@ import (
|
||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
"github.com/vishvananda/netlink"
|
"github.com/vishvananda/netlink"
|
||||||
"github.com/vishvananda/netns"
|
|
||||||
"golang.org/x/sys/unix"
|
"golang.org/x/sys/unix"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -27,11 +26,6 @@ func NewNetlinkWatcher(d Multidialer) *NetlinkWatcher {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (w *NetlinkWatcher) Start() error {
|
func (w *NetlinkWatcher) Start() error {
|
||||||
ns, err := netns.Get()
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
if err := netlink.LinkSubscribe(w.linkUpdates, w.done); err != nil {
|
if err := netlink.LinkSubscribe(w.linkUpdates, w.done); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
@ -41,11 +35,11 @@ func (w *NetlinkWatcher) Start() error {
|
||||||
}
|
}
|
||||||
|
|
||||||
w.wg.Add(1)
|
w.wg.Add(1)
|
||||||
go w.watch(ns)
|
go w.watch()
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (w *NetlinkWatcher) watch(ns netns.NsHandle) {
|
func (w *NetlinkWatcher) watch() {
|
||||||
defer w.wg.Done()
|
defer w.wg.Done()
|
||||||
|
|
||||||
for {
|
for {
|
||||||
|
|
Loading…
Reference in a new issue