mirror of
https://github.com/tailscale/tailscale.git
synced 2025-12-23 09:06:24 +00:00
net/netmon: remove usage of direct callbacks from netmon (#17292)
The callback itself is not removed as it is used in other repos, making it simpler for those to slowly transition to the eventbus. Updates #15160 Signed-off-by: Claus Lensbøl <claus@tailscale.com>
This commit is contained in:
@@ -17,6 +17,7 @@ import (
|
||||
"github.com/go-json-experiment/json/jsontext"
|
||||
"tailscale.com/tstest"
|
||||
"tailscale.com/tstime"
|
||||
"tailscale.com/util/eventbus/eventbustest"
|
||||
"tailscale.com/util/must"
|
||||
)
|
||||
|
||||
@@ -30,6 +31,7 @@ func TestFastShutdown(t *testing.T) {
|
||||
|
||||
l := NewLogger(Config{
|
||||
BaseURL: testServ.URL,
|
||||
Bus: eventbustest.NewBus(t),
|
||||
}, t.Logf)
|
||||
err := l.Shutdown(ctx)
|
||||
if err != nil {
|
||||
@@ -62,7 +64,10 @@ func NewLogtailTestHarness(t *testing.T) (*LogtailTestServer, *Logger) {
|
||||
|
||||
t.Cleanup(ts.srv.Close)
|
||||
|
||||
l := NewLogger(Config{BaseURL: ts.srv.URL}, t.Logf)
|
||||
l := NewLogger(Config{
|
||||
BaseURL: ts.srv.URL,
|
||||
Bus: eventbustest.NewBus(t),
|
||||
}, t.Logf)
|
||||
|
||||
// There is always an initial "logtail started" message
|
||||
body := <-ts.uploaded
|
||||
|
||||
Reference in New Issue
Block a user