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:
@@ -205,7 +205,6 @@ func NewNoStart(opts Options) (_ *Auto, err error) {
|
||||
}
|
||||
})
|
||||
return c, nil
|
||||
|
||||
}
|
||||
|
||||
// SetPaused controls whether HTTP activity should be paused.
|
||||
@@ -424,6 +423,11 @@ func (c *Auto) unpausedChanLocked() <-chan bool {
|
||||
return unpaused
|
||||
}
|
||||
|
||||
// ClientID returns the ClientID of the direct controlClient
|
||||
func (c *Auto) ClientID() int64 {
|
||||
return c.direct.ClientID()
|
||||
}
|
||||
|
||||
// mapRoutineState is the state of Auto.mapRoutine while it's running.
|
||||
type mapRoutineState struct {
|
||||
c *Auto
|
||||
|
||||
Reference in New Issue
Block a user