Updated at September 7, 2026 01:25 PM
box.ctl.on_election()
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.election and box.info.synchro.
Parameters:
trigger-function(function) — a trigger function
Returns
nil or a function pointer