Рейтинг@Mail.ru

box.ctl.on_election()

Замечание

Документация находится в процессе перевода и может отставать от английской версии.

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.election and box.info.synchro.

Параметры:
  • trigger-function (function) – a trigger function
Return:

nil or a function pointer