MCPcopy Index your code
hub / github.com/coder/coder / poll

Method poll

coderd/autobuild/notify/notifier.go:82–89  ·  view source on GitHub ↗

poll polls once immediately, and then periodically according to the interval. Poll exits when ticker is closed.

(interval time.Duration)

Source from the content-addressed store, hash-verified

80// poll polls once immediately, and then periodically according to the interval.
81// Poll exits when ticker is closed.
82func (n *Notifier) poll(interval time.Duration) {
83 defer close(n.pollDone)
84
85 // poll once immediately
86 _ = n.pollOnce()
87 tkr := n.clock.TickerFunc(n.ctx, interval, n.pollOnce, "notifier", "poll")
88 _ = tkr.Wait()
89}
90
91func (n *Notifier) Close() {
92 n.cancel()

Callers 3

NewFunction · 0.95
toHavePathNameFunction · 0.45
toHavePathNameEndingWithFunction · 0.45

Calls 2

pollOnceMethod · 0.95
WaitMethod · 0.65

Tested by

no test coverage detected