mirror of
https://github.com/tailscale/tailscale.git
synced 2025-10-28 22:29:37 +00:00
control/controlclient: introduce eventbus messages instead of callbacks (#16956)
This is a small introduction of the eventbus into controlclient that communicates with mainly ipnlocal. While ipnlocal is a complicated part of the codebase, the subscribers here are from the perspective of ipnlocal already called async. Updates #15160 Signed-off-by: Claus Lensbøl <claus@tailscale.com>
This commit is contained in:
@@ -15,7 +15,7 @@ import (
|
||||
|
||||
// NewBus constructs an [eventbus.Bus] that will be shut automatically when
|
||||
// its controlling test ends.
|
||||
func NewBus(t *testing.T) *eventbus.Bus {
|
||||
func NewBus(t testing.TB) *eventbus.Bus {
|
||||
bus := eventbus.New()
|
||||
t.Cleanup(bus.Close)
|
||||
return bus
|
||||
|
||||
Reference in New Issue
Block a user