MCPcopy
hub / github.com/grafana/dskit / contextFor

Method contextFor

ring/replication_set_tracker.go:67–67  ·  view source on GitHub ↗

Returns a context.Context and context.CancelFunc for instance. The context.CancelFunc will only cancel the context for this instance (ie. if this tracker is zone-aware, calling the context.CancelFunc should not cancel contexts for other instances in the same zone).

(instance *InstanceDesc)

Source from the content-addressed store, hash-verified

65 // is zone-aware, calling the context.CancelFunc should not cancel contexts for other instances
66 // in the same zone).
67 contextFor(instance *InstanceDesc) (context.Context, context.CancelCauseFunc)
68
69 // Cancels the context for instance previously obtained with contextFor.
70 // This method may cancel the context for other instances if those other instances are part of

Implementers 2

defaultContextTrackerring/replication_set_tracker.go
zoneAwareContextTrackerring/replication_set_tracker.go

Calls

no outgoing calls

Tested by 2