MCPcopy
hub / github.com/rs/zerolog / WithWaiterContext

Function WithWaiterContext

diode/internal/diodes/waiter.go:23–27  ·  view source on GitHub ↗

WithWaiterContext sets the context to cancel any retrieval (Next()). It will not change any results for adding data (Set()). Default is context.Background().

(ctx context.Context)

Source from the content-addressed store, hash-verified

21// will not change any results for adding data (Set()). Default is
22// context.Background().
23func WithWaiterContext(ctx context.Context) WaiterConfigOption {
24 return func(c *Waiter) {
25 c.ctx = ctx
26 }
27}
28
29// NewWaiter returns a new Waiter that wraps the given diode.
30func NewWaiter(d Diode, opts ...WaiterConfigOption) *Waiter {

Callers 1

NewWriterFunction · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected