box.ctl.on_election()
- 
 
box.ctl.on_election(trigger-function)¶ Since: 2.10.0
Create a trigger executed every time the current state of a replica set node in regard to leader election changes. The current state is available in the box.info.election table.
The trigger doesn’t accept any parameters. You can see the changes in
box.info.electionand box.info.synchro.Параметры: - trigger-function (
function) – a trigger function 
Return: nilor a function pointer- trigger-function (