()
| 2025 | } |
| 2026 | |
| 2027 | func (n *node) AmLeader() bool { |
| 2028 | if n.Raft() == nil { |
| 2029 | return false |
| 2030 | } |
| 2031 | r := n.Raft() |
| 2032 | return r.Status().Lead == r.Status().ID |
| 2033 | } |
| 2034 | |
| 2035 | func (n *node) monitorRaftMetrics() { |
| 2036 | ticker := time.Tick(5 * time.Second) |
no test coverage detected