MCPcopy
hub / github.com/kubernetes/client-go / newDelayingQueue

Function newDelayingQueue

util/workqueue/delaying_queue.go:45–59  ·  view source on GitHub ↗
(clock clock.Clock, name string)

Source from the content-addressed store, hash-verified

43}
44
45func newDelayingQueue(clock clock.Clock, name string) DelayingInterface {
46 ret := &delayingType{
47 Interface: NewNamed(name),
48 clock: clock,
49 heartbeat: clock.NewTicker(maxWait),
50 stopCh: make(chan struct{}),
51 waitingForAddCh: make(chan *waitFor, 1000),
52 metrics: newRetryMetrics(name),
53 deprecatedMetrics: newDeprecatedRetryMetrics(name),
54 }
55
56 go ret.waitingLoop()
57
58 return ret
59}
60
61// delayingType wraps an Interface and provides delayed re-enquing
62type delayingType struct {

Callers 7

TestSimpleQueueFunction · 0.85
TestDedupingFunction · 0.85
TestAddTwoFireEarlyFunction · 0.85
TestCopyShiftingFunction · 0.85
NewDelayingQueueFunction · 0.85
NewNamedDelayingQueueFunction · 0.85

Calls 4

waitingLoopMethod · 0.95
NewNamedFunction · 0.85
newRetryMetricsFunction · 0.85

Tested by 5

TestSimpleQueueFunction · 0.68
TestDedupingFunction · 0.68
TestAddTwoFireEarlyFunction · 0.68
TestCopyShiftingFunction · 0.68