MCPcopy
hub / github.com/redis/go-redis / Failing

Method Failing

osscluster.go:553–565  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

551}
552
553func (n *clusterNode) Failing() bool {
554 timeout := int64(n.Client.opt.FailingTimeoutSeconds)
555
556 failing := atomic.LoadUint32(&n.failing)
557 if failing == 0 {
558 return false
559 }
560 if time.Now().Unix()-int64(failing) < timeout {
561 return true
562 }
563 atomic.StoreUint32(&n.failing, 0)
564 return false
565}
566
567func (n *clusterNode) Generation() uint32 {
568 return atomic.LoadUint32(&n.generation)

Callers 5

slotSlaveNodeMethod · 0.95
slotClosestNodeMethod · 0.80
slotRandomNodeMethod · 0.80
osscluster_test.goFile · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected