mirror of
https://github.com/tailscale/tailscale.git
synced 2025-11-16 19:07:42 +00:00
net/netmon: publish events to event bus
Updates #15160 Signed-off-by: David Anderson <dave@tailscale.com>
This commit is contained in:
committed by
M. J. Fromberger
parent
6d6f69e735
commit
5399fa159a
@@ -56,6 +56,7 @@ import (
|
||||
"tailscale.com/types/ptr"
|
||||
"tailscale.com/types/tkatype"
|
||||
"tailscale.com/util/clientmetric"
|
||||
"tailscale.com/util/eventbus"
|
||||
"tailscale.com/util/httphdr"
|
||||
"tailscale.com/util/httpm"
|
||||
"tailscale.com/util/mak"
|
||||
@@ -840,7 +841,9 @@ func (h *Handler) serveDebugPortmap(w http.ResponseWriter, r *http.Request) {
|
||||
})
|
||||
defer c.Close()
|
||||
|
||||
netMon, err := netmon.New(logger.WithPrefix(logf, "monitor: "))
|
||||
bus := eventbus.New()
|
||||
defer bus.Close()
|
||||
netMon, err := netmon.New(bus, logger.WithPrefix(logf, "monitor: "))
|
||||
if err != nil {
|
||||
logf("error creating monitor: %v", err)
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user