()
| 551 | } |
| 552 | |
| 553 | func (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 | |
| 567 | func (n *clusterNode) Generation() uint32 { |
| 568 | return atomic.LoadUint32(&n.generation) |
no outgoing calls
no test coverage detected