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

Method Timeout

coderd/database/pubsub/watchdog.go:75–77  ·  view source on GitHub ↗

Timeout returns a channel that is closed if the watchdog times out. Note that the Timeout() chan will NOT be closed if the Watchdog is Close'd or its context expires, so it is important to read from the Timeout() chan in a select e.g. w := NewWatchDog(ctx, logger, ps) select { case <-ctx.Done(): c

()

Source from the content-addressed store, hash-verified

73// FreakOut()
74// }
75func (w *Watchdog) Timeout() <-chan struct{} {
76 return w.timeout
77}
78
79func (w *Watchdog) publishLoop() {
80 defer w.wg.Done()

Callers 3

ServerMethod · 0.95
TestWatchdog_NoTimeoutFunction · 0.45
TestWatchdog_TimeoutFunction · 0.45

Calls

no outgoing calls

Tested by 2

TestWatchdog_NoTimeoutFunction · 0.36
TestWatchdog_TimeoutFunction · 0.36