Gets whether the election has any leader.
Closes the election observer.
Returns the currently-elected leader value (passed to campaign()
or
proclaim()
), or undefined if there's no elected leader.
Returns the currently-elected leader value (passed to campaign()
or
proclaim()
), or undefined if there's no elected leader.
change is fired when the elected value changes. It can be fired with undefined if there's no longer a leader.
disconnected is fired when the underlying watcher is disconnected. Etcd3
will automatically attempt to reconnect in the background. This has the
same semantics as the disconnected
event on the Watcher.
error is fired if the underlying election watcher experiences an unrecoverable error.
Generated using TypeDoc
Object returned from election.observer() that exposees information about the current election.