Redis Sentinel wrapper for Node.js. Provides methods and events for the Redis Sentinel API.
npm install node-sentinel
var Sentinel =//init with ip and port for the sentinel servers = '127.0.0.1''26379';/******* Sentinel API examples *******/s;s;s;s;s;s;s;s;/******* Sentinel pub/sub messages events *******///The master was reset.s;//A new slave was detected and attached.s;//A failover started by another Sentinel or any other external entity was detected (An attached slave turned into a master).s;s;//One or more sentinels for the specified master were removed as duplicated (this happens for instance when a Sentinel instance is restarted).s;//A new sentinel for this master was detected and attached.s;//The specified instance is now in Subjectively Down state.s;//The specified instance is no longer in Subjectively Down state.s;//The specified instance is now in Objectively Down state.s;//The specified instance is no longer in Objectively Down state.s;//25% of the configured failover timeout has elapsed, but this sentinel can't see any progress, and is the new leader. It starts to act as the new leader reconfiguring the remaining slaves to replicate with the new master.s;//We are starting a new failover as a the leader sentinel.s;s;//We are starting to monitor the new master, using the same name of the old one. The old master will be completely removed from our tables.s;//Tilt mode entered.s;//Tilt mode exited.s;//Not documenteds;
TODO: Add description for each API method and each event
Copyright (c) 2013 Javier Baena
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.