mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
add HasLeader function
This commit is contained in:
@@ -47,6 +47,8 @@ func Dictate(n *Node) *Node {
|
||||
|
||||
func (n *Node) Id() int { return n.sm.id }
|
||||
|
||||
func (n *Node) HasLeader() bool { return n.sm.lead != none }
|
||||
|
||||
// Propose asynchronously proposes data be applied to the underlying state machine.
|
||||
func (n *Node) Propose(data []byte) { n.propose(normal, data) }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user