]> git.saurik.com Git - redis.git/commit - src/sentinel.c
Sentinel: client reconfiguration script execution.
authorantirez <antirez@gmail.com>
Thu, 2 Aug 2012 16:40:30 +0000 (18:40 +0200)
committerantirez <antirez@gmail.com>
Thu, 2 Aug 2012 16:40:30 +0000 (18:40 +0200)
commit6275004ca6c5a127c84158a290e9524c5ef5c410
tree1e8a654bd2cf8e02ec6731a63283823439cbf700
parent2990c366e8286a057fb016b078b00af2476c6be1
Sentinel: client reconfiguration script execution.

This commit adds support to optionally execute a script when one of the
following events happen:

* The failover starts (with a slave already promoted).
* The failover ends.
* The failover is aborted.

The script is called with enough parameters (documented in the example
sentinel.conf file) to provide information about the old and new ip:port
pair of the master, the role of the sentinel (leader or observer) and
the name of the master.

The goal of the script is to inform clients of the configuration change
in a way specific to the environment Sentinel is running, that can't be
implemented in a genereal way inside Sentinel itself.
sentinel.conf
src/sentinel.c