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:
@@ -27,13 +27,15 @@ func TestNewDirect(t *testing.T) {
|
||||
bus := eventbustest.NewBus(t)
|
||||
|
||||
k := key.NewMachine()
|
||||
dialer := tsdial.NewDialer(netmon.NewStatic())
|
||||
dialer.SetBus(bus)
|
||||
opts := Options{
|
||||
ServerURL: "https://example.com",
|
||||
Hostinfo: hi,
|
||||
GetMachinePrivateKey: func() (key.MachinePrivate, error) {
|
||||
return k, nil
|
||||
},
|
||||
Dialer: tsdial.NewDialer(netmon.NewStatic()),
|
||||
Dialer: dialer,
|
||||
Bus: bus,
|
||||
}
|
||||
c, err := NewDirect(opts)
|
||||
@@ -105,13 +107,15 @@ func TestTsmpPing(t *testing.T) {
|
||||
bus := eventbustest.NewBus(t)
|
||||
|
||||
k := key.NewMachine()
|
||||
dialer := tsdial.NewDialer(netmon.NewStatic())
|
||||
dialer.SetBus(bus)
|
||||
opts := Options{
|
||||
ServerURL: "https://example.com",
|
||||
Hostinfo: hi,
|
||||
GetMachinePrivateKey: func() (key.MachinePrivate, error) {
|
||||
return k, nil
|
||||
},
|
||||
Dialer: tsdial.NewDialer(netmon.NewStatic()),
|
||||
Dialer: dialer,
|
||||
Bus: bus,
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user