MCPcopy
hub / github.com/tailscale/tailscale / Monitor

Method Monitor

util/eventbus/monitor.go:50–54  ·  view source on GitHub ↗

Monitor executes f in a new goroutine attended by a [Monitor]. The caller is responsible for waiting for the goroutine to complete, by calling either [Monitor.Close] or [Monitor.Wait].

(f func(*Client))

Source from the content-addressed store, hash-verified

48// is responsible for waiting for the goroutine to complete, by calling either
49// [Monitor.Close] or [Monitor.Wait].
50func (c *Client) Monitor(f func(*Client)) Monitor {
51 done := make(chan struct{})
52 go func() { defer close(done); f(c) }()
53 return Monitor{cli: c, done: done}
54}

Callers 4

runMonitorFunction · 0.80
SetBusMethod · 0.80
NewTrackerFunction · 0.80
TestMonitorFunction · 0.80

Calls

no outgoing calls

Tested by 1

TestMonitorFunction · 0.64