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

Method WithPredicate

cli/cliutil/queue.go:34–37  ·  view source on GitHub ↗

WithPredicate adds the given predicate function, which can control what is pushed to the queue.

(pred func(x T) (T, bool))

Source from the content-addressed store, hash-verified

32// WithPredicate adds the given predicate function, which can control what is
33// pushed to the queue.
34func (q *Queue[T]) WithPredicate(pred func(x T) (T, bool)) *Queue[T] {
35 q.pred = pred
36 return q
37}
38
39// Close aborts any pending pops and makes future pushes error.
40func (q *Queue[T]) Close() {

Callers 2

mcpServerMethod · 0.80
TestQueueFunction · 0.80

Calls

no outgoing calls

Tested by 1

TestQueueFunction · 0.64