0.0
No release in over 3 years
Low commit activity in last 3 years
Redic::Sentinels is a wrapper for the Redis client that fetches configuration details from sentinels
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.12
~> 0.8
~> 5.0
~> 0.2
~> 10.0
~> 0.12

Runtime

~> 1.5
 Project Readme

Redic::Sentinels

Gem Version Build Status Coverage Status Code Climate

Redic::Sentinels is a wrapper for the Redis client that fetches configuration details from sentinels.

Based on soveran/redisent

Installation

Add this line to your application's Gemfile:

gem 'redic-sentinels'

And then execute:

$ bundle

Or install it yourself as:

$ gem install redic-sentinels

Usage

hosts = [
  'localhost:26379',
  'localhost:26380',
  'localhost:26381'
]

redis = Redic::Sentinels.new hosts: hosts, 
                             master_name: 'mymaster', 
                             db: 1, # optional (default: 0)
                             password: 'pass', # optional
                             max_retries: 5 # optional (default: 3): Number of attempts to reconnect to master

redis.call 'PING' # => 'PONG'

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/gabynaiman/redic-sentinels.

License

The gem is available as open source under the terms of the MIT License.