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

Function WithPollingContext

diode/internal/diodes/poller.go:35–39  ·  view source on GitHub ↗

WithPollingContext 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

33// will not change any results for adding data (Set()). Default is
34// context.Background().
35func WithPollingContext(ctx context.Context) PollerConfigOption {
36 return func(c *Poller) {
37 c.ctx = ctx
38 }
39}
40
41// NewPoller returns a new Poller that wraps the given diode.
42func NewPoller(d Diode, opts ...PollerConfigOption) *Poller {

Callers 1

NewWriterFunction · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected