ipn/ipnlocal: use context.CancelFunc type for doc clarity

Using context.CancelFunc as the type (instead of func()) answers
questions like whether it's okay to call it multiple times, whether
it blocks, etc. And that's the type it actually is in this case.

Updates #cleanup

Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
Brad Fitzpatrick 2025-01-03 08:49:29 -08:00 committed by Brad Fitzpatrick
parent 03b9361f47
commit e3bcb2ec83

View File

@ -163,7 +163,7 @@ type watchSession struct {
ch chan *ipn.Notify
owner ipnauth.Actor // or nil
sessionID string
cancel func() // call to signal that the session must be terminated
cancel context.CancelFunc // to shut down the session
}
// LocalBackend is the glue between the major pieces of the Tailscale