CurrentLoad returns the current node returns the number of open connections plus the penalty.
()
| 156 | // CurrentLoad returns the current node returns the number of open connections |
| 157 | // plus the penalty. |
| 158 | func (n *Node) CurrentLoad() uint32 { |
| 159 | c := n.connections.Load() |
| 160 | p := n.penalty.Load() |
| 161 | return c + p |
| 162 | } |
| 163 | |
| 164 | func (n *Node) CurrentConnections() uint32 { |
| 165 | return n.connections.Load() |