redis_failover 0.9.6 → 0.9.7
Sign up to get free protection for your applications and to get access to all the features.
- data/Changes.md +4 -0
- data/README.md +1 -0
- data/lib/redis_failover/client.rb +15 -0
- data/lib/redis_failover/version.rb +1 -1
- data/spec/client_spec.rb +6 -0
- metadata +4 -4
data/Changes.md
CHANGED
data/README.md
CHANGED
@@ -175,6 +175,7 @@ redis_failover uses YARD for its API documentation. Refer to the generated [API
|
|
175
175
|
- To learn more about ZooKeeper, see the official [ZooKeeper](http://zookeeper.apache.org/) site.
|
176
176
|
- See the [Quick ZooKeeper Guide](https://github.com/ryanlecompte/redis_failover/wiki/Quick-ZooKeeper-Guide) for a quick guide to getting ZooKeeper up and running with redis_failover.
|
177
177
|
- To learn more about how ZooKeeper handles network partitions, see [ZooKeeper Failure Scenarios](http://wiki.apache.org/hadoop/ZooKeeper/FailureScenarios)
|
178
|
+
- Slides for a [lightning talk](http://www.slideshare.net/ryanlecompte/handling-redis-failover-with-zookeeper) that I gave at BaRuCo 2012.
|
178
179
|
- Feel free to join #zk-gem on the IRC freenode network. We're usually hanging out there talking about ZooKeeper and redis_failover.
|
179
180
|
|
180
181
|
|
@@ -64,6 +64,21 @@ module RedisFailover
|
|
64
64
|
build_clients
|
65
65
|
end
|
66
66
|
|
67
|
+
# Stubs this method to return this RedisFailover::Client object.
|
68
|
+
#
|
69
|
+
# Some libraries (Resque) assume they can access the `client` via this method,
|
70
|
+
# but we don't want to actually ever expose the internal Redis connections.
|
71
|
+
#
|
72
|
+
# By returning `self` here, we can add stubs for functionality like #reconnect,
|
73
|
+
# and everything will Just Work.
|
74
|
+
#
|
75
|
+
# Takes an *args array for safety only.
|
76
|
+
#
|
77
|
+
# @return [RedisFailover::Client]
|
78
|
+
def client(*args)
|
79
|
+
self
|
80
|
+
end
|
81
|
+
|
67
82
|
# Specifies a callback to invoke when the current redis node list changes.
|
68
83
|
#
|
69
84
|
# @param [Proc] a callback with current master and slaves as arguments
|
data/spec/client_spec.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: redis_failover
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.7
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-09-
|
12
|
+
date: 2012-09-24 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: redis
|
@@ -189,7 +189,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
189
189
|
version: '0'
|
190
190
|
segments:
|
191
191
|
- 0
|
192
|
-
hash:
|
192
|
+
hash: 2274017525429057162
|
193
193
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
194
194
|
none: false
|
195
195
|
requirements:
|
@@ -198,7 +198,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
198
198
|
version: '0'
|
199
199
|
segments:
|
200
200
|
- 0
|
201
|
-
hash:
|
201
|
+
hash: 2274017525429057162
|
202
202
|
requirements: []
|
203
203
|
rubyforge_project:
|
204
204
|
rubygems_version: 1.8.23
|