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

Struct streamSilenceGuard

coderd/x/chatd/chatloop/chatloop.go:800–806  ·  view source on GitHub ↗

streamSilenceGuard arbitrates whether an attempt times out while waiting for the next stream part. Exactly one outcome wins: the timer cancels the attempt, or release disarms the timer.

Source from the content-addressed store, hash-verified

798// waiting for the next stream part. Exactly one outcome wins: the
799// timer cancels the attempt, or release disarms the timer.
800type streamSilenceGuard struct {
801 mu sync.Mutex
802 timer *quartz.Timer
803 cancel context.CancelCauseFunc
804 timeout time.Duration
805 settled bool
806}
807
808func newStreamSilenceGuard(
809 clock quartz.Clock,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected