MCPcopy Create free account
hub / github.com/cloudfoundry/go-diodes / WithPollingContext

Function WithPollingContext

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 PollerConfigOption(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

nothing calls this directly

Calls 1

PollerConfigOptionFuncType · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…