()
| 54 | } |
| 55 | |
| 56 | func (n *node) amLeader() bool { |
| 57 | if n.Raft() == nil { |
| 58 | return false |
| 59 | } |
| 60 | r := n.Raft() |
| 61 | return r.Status().Lead == r.Status().ID |
| 62 | } |
| 63 | |
| 64 | func (n *node) AmLeader() bool { |
| 65 | // Return false if the node is not the leader. Otherwise, check the lastQuorum as well. |
no test coverage detected