mirror of
https://github.com/tailscale/tailscale.git
synced 2025-10-24 09:39:39 +00:00
control/controlclient: replace a status func with Observer interface
For now the method has only one interface (the same as the func it's replacing) but it will grow, eventually with the goal to remove the controlclient.Status type for most purposes. Updates #1909 Change-Id: I715c8bf95e3f5943055a94e76af98d988558a2f2 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
committed by
Brad Fitzpatrick
parent
a64593d7ef
commit
55bb7314f2
@@ -162,7 +162,7 @@ func (cc *mockControl) send(err error, url string, loginFinished bool, nm *netma
|
||||
cc.authBlocked = false
|
||||
cc.mu.Unlock()
|
||||
}
|
||||
if cc.opts.Status != nil {
|
||||
if cc.opts.Observer != nil {
|
||||
pv := cc.persist.View()
|
||||
s := controlclient.Status{
|
||||
URL: url,
|
||||
@@ -175,7 +175,7 @@ func (cc *mockControl) send(err error, url string, loginFinished bool, nm *netma
|
||||
} else if url == "" && err == nil && nm == nil {
|
||||
s.LogoutFinished = &empty.Message{}
|
||||
}
|
||||
cc.opts.Status(s)
|
||||
cc.opts.Observer.SetControlClientStatus(s)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user