switch_gear 0.2.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/CODE_OF_CONDUCT.md +1 -1
- data/README.md +7 -4
- data/docs/SwitchGear.html +127 -0
- data/docs/SwitchGear/CircuitBreaker.html +1004 -0
- data/docs/SwitchGear/CircuitBreaker/Failure.html +448 -0
- data/docs/SwitchGear/CircuitBreaker/Memory.html +929 -0
- data/docs/SwitchGear/CircuitBreaker/OpenError.html +124 -0
- data/docs/SwitchGear/CircuitBreaker/Redis.html +1032 -0
- data/docs/_config.yml +1 -0
- data/docs/_index.html +182 -0
- data/docs/class_list.html +51 -0
- data/docs/css/common.css +1 -0
- data/docs/css/full_list.css +58 -0
- data/docs/css/style.css +492 -0
- data/docs/file.README.html +205 -0
- data/docs/file_list.html +56 -0
- data/docs/frames.html +17 -0
- data/docs/index.html +205 -0
- data/docs/js/app.js +243 -0
- data/docs/js/full_list.js +216 -0
- data/docs/js/jquery.js +4 -0
- data/docs/method_list.html +315 -0
- data/docs/top-level-namespace.html +110 -0
- data/lib/switch_gear.rb +1 -0
- data/lib/switch_gear/circuit_breaker.rb +9 -4
- data/lib/switch_gear/circuit_breaker/failure.rb +2 -2
- data/lib/switch_gear/circuit_breaker/memory.rb +4 -4
- data/lib/switch_gear/circuit_breaker/redis.rb +15 -5
- data/lib/switch_gear/version.rb +1 -1
- metadata +23 -2
@@ -0,0 +1,124 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<meta charset="utf-8">
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6
|
+
<title>
|
7
|
+
Exception: SwitchGear::CircuitBreaker::OpenError
|
8
|
+
|
9
|
+
— Documentation by YARD 0.9.8
|
10
|
+
|
11
|
+
</title>
|
12
|
+
|
13
|
+
<link rel="stylesheet" href="../../css/style.css" type="text/css" charset="utf-8" />
|
14
|
+
|
15
|
+
<link rel="stylesheet" href="../../css/common.css" type="text/css" charset="utf-8" />
|
16
|
+
|
17
|
+
<script type="text/javascript" charset="utf-8">
|
18
|
+
pathId = "SwitchGear::CircuitBreaker::OpenError";
|
19
|
+
relpath = '../../';
|
20
|
+
</script>
|
21
|
+
|
22
|
+
|
23
|
+
<script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script>
|
24
|
+
|
25
|
+
<script type="text/javascript" charset="utf-8" src="../../js/app.js"></script>
|
26
|
+
|
27
|
+
|
28
|
+
</head>
|
29
|
+
<body>
|
30
|
+
<div class="nav_wrap">
|
31
|
+
<iframe id="nav" src="../../class_list.html?1"></iframe>
|
32
|
+
<div id="resizer"></div>
|
33
|
+
</div>
|
34
|
+
|
35
|
+
<div id="main" tabindex="-1">
|
36
|
+
<div id="header">
|
37
|
+
<div id="menu">
|
38
|
+
|
39
|
+
<a href="../../_index.html">Index (O)</a> »
|
40
|
+
<span class='title'><span class='object_link'><a href="../../SwitchGear.html" title="SwitchGear (module)">SwitchGear</a></span></span> » <span class='title'><span class='object_link'><a href="../CircuitBreaker.html" title="SwitchGear::CircuitBreaker (module)">CircuitBreaker</a></span></span>
|
41
|
+
»
|
42
|
+
<span class="title">OpenError</span>
|
43
|
+
|
44
|
+
</div>
|
45
|
+
|
46
|
+
<div id="search">
|
47
|
+
|
48
|
+
<a class="full_list_link" id="class_list_link"
|
49
|
+
href="../../class_list.html">
|
50
|
+
|
51
|
+
<svg width="24" height="24">
|
52
|
+
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
|
53
|
+
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
|
54
|
+
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
|
55
|
+
</svg>
|
56
|
+
</a>
|
57
|
+
|
58
|
+
</div>
|
59
|
+
<div class="clear"></div>
|
60
|
+
</div>
|
61
|
+
|
62
|
+
<div id="content"><h1>Exception: SwitchGear::CircuitBreaker::OpenError
|
63
|
+
|
64
|
+
|
65
|
+
|
66
|
+
</h1>
|
67
|
+
<div class="box_info">
|
68
|
+
|
69
|
+
<dl>
|
70
|
+
<dt>Inherits:</dt>
|
71
|
+
<dd>
|
72
|
+
<span class="inheritName">StandardError</span>
|
73
|
+
|
74
|
+
<ul class="fullTree">
|
75
|
+
<li>Object</li>
|
76
|
+
|
77
|
+
<li class="next">StandardError</li>
|
78
|
+
|
79
|
+
<li class="next">SwitchGear::CircuitBreaker::OpenError</li>
|
80
|
+
|
81
|
+
</ul>
|
82
|
+
<a href="#" class="inheritanceTree">show all</a>
|
83
|
+
|
84
|
+
</dd>
|
85
|
+
</dl>
|
86
|
+
|
87
|
+
|
88
|
+
|
89
|
+
|
90
|
+
|
91
|
+
|
92
|
+
|
93
|
+
|
94
|
+
|
95
|
+
|
96
|
+
|
97
|
+
<dl>
|
98
|
+
<dt>Defined in:</dt>
|
99
|
+
<dd>lib/switch_gear/circuit_breaker/open_error.rb</dd>
|
100
|
+
</dl>
|
101
|
+
|
102
|
+
</div>
|
103
|
+
|
104
|
+
|
105
|
+
|
106
|
+
|
107
|
+
|
108
|
+
|
109
|
+
|
110
|
+
|
111
|
+
|
112
|
+
|
113
|
+
|
114
|
+
</div>
|
115
|
+
|
116
|
+
<div id="footer">
|
117
|
+
Generated on Fri May 26 06:53:24 2017 by
|
118
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
119
|
+
0.9.8 (ruby-2.4.0).
|
120
|
+
</div>
|
121
|
+
|
122
|
+
</div>
|
123
|
+
</body>
|
124
|
+
</html>
|
@@ -0,0 +1,1032 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<meta charset="utf-8">
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6
|
+
<title>
|
7
|
+
Class: SwitchGear::CircuitBreaker::Redis
|
8
|
+
|
9
|
+
— Documentation by YARD 0.9.8
|
10
|
+
|
11
|
+
</title>
|
12
|
+
|
13
|
+
<link rel="stylesheet" href="../../css/style.css" type="text/css" charset="utf-8" />
|
14
|
+
|
15
|
+
<link rel="stylesheet" href="../../css/common.css" type="text/css" charset="utf-8" />
|
16
|
+
|
17
|
+
<script type="text/javascript" charset="utf-8">
|
18
|
+
pathId = "SwitchGear::CircuitBreaker::Redis";
|
19
|
+
relpath = '../../';
|
20
|
+
</script>
|
21
|
+
|
22
|
+
|
23
|
+
<script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script>
|
24
|
+
|
25
|
+
<script type="text/javascript" charset="utf-8" src="../../js/app.js"></script>
|
26
|
+
|
27
|
+
|
28
|
+
</head>
|
29
|
+
<body>
|
30
|
+
<div class="nav_wrap">
|
31
|
+
<iframe id="nav" src="../../class_list.html?1"></iframe>
|
32
|
+
<div id="resizer"></div>
|
33
|
+
</div>
|
34
|
+
|
35
|
+
<div id="main" tabindex="-1">
|
36
|
+
<div id="header">
|
37
|
+
<div id="menu">
|
38
|
+
|
39
|
+
<a href="../../_index.html">Index (R)</a> »
|
40
|
+
<span class='title'><span class='object_link'><a href="../../SwitchGear.html" title="SwitchGear (module)">SwitchGear</a></span></span> » <span class='title'><span class='object_link'><a href="../CircuitBreaker.html" title="SwitchGear::CircuitBreaker (module)">CircuitBreaker</a></span></span>
|
41
|
+
»
|
42
|
+
<span class="title">Redis</span>
|
43
|
+
|
44
|
+
</div>
|
45
|
+
|
46
|
+
<div id="search">
|
47
|
+
|
48
|
+
<a class="full_list_link" id="class_list_link"
|
49
|
+
href="../../class_list.html">
|
50
|
+
|
51
|
+
<svg width="24" height="24">
|
52
|
+
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
|
53
|
+
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
|
54
|
+
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
|
55
|
+
</svg>
|
56
|
+
</a>
|
57
|
+
|
58
|
+
</div>
|
59
|
+
<div class="clear"></div>
|
60
|
+
</div>
|
61
|
+
|
62
|
+
<div id="content"><h1>Class: SwitchGear::CircuitBreaker::Redis
|
63
|
+
|
64
|
+
|
65
|
+
|
66
|
+
</h1>
|
67
|
+
<div class="box_info">
|
68
|
+
|
69
|
+
<dl>
|
70
|
+
<dt>Inherits:</dt>
|
71
|
+
<dd>
|
72
|
+
<span class="inheritName">Object</span>
|
73
|
+
|
74
|
+
<ul class="fullTree">
|
75
|
+
<li>Object</li>
|
76
|
+
|
77
|
+
<li class="next">SwitchGear::CircuitBreaker::Redis</li>
|
78
|
+
|
79
|
+
</ul>
|
80
|
+
<a href="#" class="inheritanceTree">show all</a>
|
81
|
+
|
82
|
+
</dd>
|
83
|
+
</dl>
|
84
|
+
|
85
|
+
|
86
|
+
|
87
|
+
|
88
|
+
|
89
|
+
|
90
|
+
<dl>
|
91
|
+
<dt>Includes:</dt>
|
92
|
+
<dd><span class='object_link'><a href="../CircuitBreaker.html" title="SwitchGear::CircuitBreaker (module)">SwitchGear::CircuitBreaker</a></span></dd>
|
93
|
+
</dl>
|
94
|
+
|
95
|
+
|
96
|
+
|
97
|
+
|
98
|
+
|
99
|
+
|
100
|
+
<dl>
|
101
|
+
<dt>Defined in:</dt>
|
102
|
+
<dd>lib/switch_gear/circuit_breaker/redis.rb</dd>
|
103
|
+
</dl>
|
104
|
+
|
105
|
+
</div>
|
106
|
+
|
107
|
+
|
108
|
+
|
109
|
+
|
110
|
+
|
111
|
+
<h2>Instance Attribute Summary <small><a href="#" class="summary_toggle">collapse</a></small></h2>
|
112
|
+
<ul class="summary">
|
113
|
+
|
114
|
+
<li class="public ">
|
115
|
+
<span class="summary_signature">
|
116
|
+
|
117
|
+
<a href="#circuit-instance_method" title="#circuit (instance method)">#<strong>circuit</strong> ⇒ Object </a>
|
118
|
+
|
119
|
+
|
120
|
+
|
121
|
+
</span>
|
122
|
+
|
123
|
+
|
124
|
+
|
125
|
+
|
126
|
+
|
127
|
+
|
128
|
+
|
129
|
+
|
130
|
+
|
131
|
+
|
132
|
+
|
133
|
+
|
134
|
+
<span class="summary_desc"><div class='inline'>
|
135
|
+
<p>(look to <span class='object_link'><a href="Memory.html#circuit-instance_method" title="SwitchGear::CircuitBreaker::Memory#circuit (method)">Memory#circuit</a></span>).</p>
|
136
|
+
</div></span>
|
137
|
+
|
138
|
+
</li>
|
139
|
+
|
140
|
+
|
141
|
+
<li class="public ">
|
142
|
+
<span class="summary_signature">
|
143
|
+
|
144
|
+
<a href="#client-instance_method" title="#client (instance method)">#<strong>client</strong> ⇒ Object </a>
|
145
|
+
|
146
|
+
|
147
|
+
|
148
|
+
</span>
|
149
|
+
|
150
|
+
|
151
|
+
|
152
|
+
|
153
|
+
|
154
|
+
|
155
|
+
|
156
|
+
|
157
|
+
|
158
|
+
|
159
|
+
|
160
|
+
|
161
|
+
<span class="summary_desc"><div class='inline'>
|
162
|
+
<p>An instance of an redis client.</p>
|
163
|
+
</div></span>
|
164
|
+
|
165
|
+
</li>
|
166
|
+
|
167
|
+
|
168
|
+
<li class="public ">
|
169
|
+
<span class="summary_signature">
|
170
|
+
|
171
|
+
<a href="#failure_limit-instance_method" title="#failure_limit (instance method)">#<strong>failure_limit</strong> ⇒ Object </a>
|
172
|
+
|
173
|
+
|
174
|
+
|
175
|
+
</span>
|
176
|
+
|
177
|
+
|
178
|
+
|
179
|
+
|
180
|
+
|
181
|
+
|
182
|
+
|
183
|
+
|
184
|
+
|
185
|
+
|
186
|
+
|
187
|
+
|
188
|
+
<span class="summary_desc"><div class='inline'>
|
189
|
+
<p>(look to <span class='object_link'><a href="Memory.html#failure_limit-instance_method" title="SwitchGear::CircuitBreaker::Memory#failure_limit (method)">Memory#failure_limit</a></span>).</p>
|
190
|
+
</div></span>
|
191
|
+
|
192
|
+
</li>
|
193
|
+
|
194
|
+
|
195
|
+
<li class="public ">
|
196
|
+
<span class="summary_signature">
|
197
|
+
|
198
|
+
<a href="#failures-instance_method" title="#failures (instance method)">#<strong>failures</strong> ⇒ Object </a>
|
199
|
+
|
200
|
+
|
201
|
+
|
202
|
+
</span>
|
203
|
+
|
204
|
+
|
205
|
+
|
206
|
+
|
207
|
+
|
208
|
+
|
209
|
+
|
210
|
+
|
211
|
+
|
212
|
+
|
213
|
+
|
214
|
+
|
215
|
+
<span class="summary_desc"><div class='inline'>
|
216
|
+
<p>(look to <span class='object_link'><a href="Memory.html#failures-instance_method" title="SwitchGear::CircuitBreaker::Memory#failures (method)">Memory#failures</a></span>).</p>
|
217
|
+
</div></span>
|
218
|
+
|
219
|
+
</li>
|
220
|
+
|
221
|
+
|
222
|
+
<li class="public ">
|
223
|
+
<span class="summary_signature">
|
224
|
+
|
225
|
+
<a href="#logger-instance_method" title="#logger (instance method)">#<strong>logger</strong> ⇒ Object </a>
|
226
|
+
|
227
|
+
|
228
|
+
|
229
|
+
</span>
|
230
|
+
|
231
|
+
|
232
|
+
|
233
|
+
|
234
|
+
|
235
|
+
|
236
|
+
|
237
|
+
|
238
|
+
|
239
|
+
|
240
|
+
|
241
|
+
|
242
|
+
<span class="summary_desc"><div class='inline'>
|
243
|
+
<p>(look to <span class='object_link'><a href="Memory.html#logger-instance_method" title="SwitchGear::CircuitBreaker::Memory#logger (method)">Memory#logger</a></span>).</p>
|
244
|
+
</div></span>
|
245
|
+
|
246
|
+
</li>
|
247
|
+
|
248
|
+
|
249
|
+
<li class="public ">
|
250
|
+
<span class="summary_signature">
|
251
|
+
|
252
|
+
<a href="#namespace-instance_method" title="#namespace (instance method)">#<strong>namespace</strong> ⇒ String </a>
|
253
|
+
|
254
|
+
|
255
|
+
|
256
|
+
</span>
|
257
|
+
|
258
|
+
|
259
|
+
|
260
|
+
|
261
|
+
|
262
|
+
|
263
|
+
|
264
|
+
|
265
|
+
|
266
|
+
|
267
|
+
|
268
|
+
|
269
|
+
<span class="summary_desc"><div class='inline'>
|
270
|
+
<p>A unique name that will be used across servers to sync state and failures.</p>
|
271
|
+
</div></span>
|
272
|
+
|
273
|
+
</li>
|
274
|
+
|
275
|
+
|
276
|
+
<li class="public ">
|
277
|
+
<span class="summary_signature">
|
278
|
+
|
279
|
+
<a href="#reset_timeout-instance_method" title="#reset_timeout (instance method)">#<strong>reset_timeout</strong> ⇒ Object </a>
|
280
|
+
|
281
|
+
|
282
|
+
|
283
|
+
</span>
|
284
|
+
|
285
|
+
|
286
|
+
|
287
|
+
|
288
|
+
|
289
|
+
|
290
|
+
|
291
|
+
|
292
|
+
|
293
|
+
|
294
|
+
|
295
|
+
|
296
|
+
<span class="summary_desc"><div class='inline'>
|
297
|
+
<p>(look to <span class='object_link'><a href="Memory.html#reset_timeout-instance_method" title="SwitchGear::CircuitBreaker::Memory#reset_timeout (method)">Memory#reset_timeout</a></span>).</p>
|
298
|
+
</div></span>
|
299
|
+
|
300
|
+
</li>
|
301
|
+
|
302
|
+
|
303
|
+
<li class="public ">
|
304
|
+
<span class="summary_signature">
|
305
|
+
|
306
|
+
<a href="#state-instance_method" title="#state (instance method)">#<strong>state</strong> ⇒ Object </a>
|
307
|
+
|
308
|
+
|
309
|
+
|
310
|
+
</span>
|
311
|
+
|
312
|
+
|
313
|
+
|
314
|
+
|
315
|
+
|
316
|
+
|
317
|
+
|
318
|
+
|
319
|
+
|
320
|
+
|
321
|
+
|
322
|
+
|
323
|
+
<span class="summary_desc"><div class='inline'>
|
324
|
+
<p>(look to <span class='object_link'><a href="Memory.html#state-instance_method" title="SwitchGear::CircuitBreaker::Memory#state (method)">Memory#state</a></span>).</p>
|
325
|
+
</div></span>
|
326
|
+
|
327
|
+
</li>
|
328
|
+
|
329
|
+
|
330
|
+
</ul>
|
331
|
+
|
332
|
+
|
333
|
+
|
334
|
+
|
335
|
+
|
336
|
+
<h2>
|
337
|
+
Instance Method Summary
|
338
|
+
<small><a href="#" class="summary_toggle">collapse</a></small>
|
339
|
+
</h2>
|
340
|
+
|
341
|
+
<ul class="summary">
|
342
|
+
|
343
|
+
<li class="public ">
|
344
|
+
<span class="summary_signature">
|
345
|
+
|
346
|
+
<a href="#add_failure-instance_method" title="#add_failure (instance method)">#<strong>add_failure</strong>(failure) ⇒ Object </a>
|
347
|
+
|
348
|
+
|
349
|
+
|
350
|
+
</span>
|
351
|
+
|
352
|
+
|
353
|
+
|
354
|
+
|
355
|
+
|
356
|
+
|
357
|
+
|
358
|
+
|
359
|
+
|
360
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
361
|
+
|
362
|
+
</li>
|
363
|
+
|
364
|
+
|
365
|
+
<li class="public ">
|
366
|
+
<span class="summary_signature">
|
367
|
+
|
368
|
+
<a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong> {|circuit, failure_limit, reset_timeout, logger, client, namespace| ... } ⇒ SwitchGear::CircuitBreaker::Redis </a>
|
369
|
+
|
370
|
+
|
371
|
+
|
372
|
+
</span>
|
373
|
+
|
374
|
+
|
375
|
+
<span class="note title constructor">constructor</span>
|
376
|
+
|
377
|
+
|
378
|
+
|
379
|
+
|
380
|
+
|
381
|
+
|
382
|
+
|
383
|
+
|
384
|
+
<span class="summary_desc"><div class='inline'>
|
385
|
+
<p>The main class to instantiate the CircuitBraker class.</p>
|
386
|
+
</div></span>
|
387
|
+
|
388
|
+
</li>
|
389
|
+
|
390
|
+
|
391
|
+
</ul>
|
392
|
+
|
393
|
+
|
394
|
+
|
395
|
+
|
396
|
+
|
397
|
+
|
398
|
+
|
399
|
+
|
400
|
+
|
401
|
+
|
402
|
+
|
403
|
+
<h3 class="inherited">Methods included from <span class='object_link'><a href="../CircuitBreaker.html" title="SwitchGear::CircuitBreaker (module)">SwitchGear::CircuitBreaker</a></span></h3>
|
404
|
+
<p class="inherited"><span class='object_link'><a href="../CircuitBreaker.html#call-instance_method" title="SwitchGear::CircuitBreaker#call (method)">#call</a></span>, <span class='object_link'><a href="../CircuitBreaker.html#closed%3F-instance_method" title="SwitchGear::CircuitBreaker#closed? (method)">#closed?</a></span>, <span class='object_link'><a href="../CircuitBreaker.html#failure_count-instance_method" title="SwitchGear::CircuitBreaker#failure_count (method)">#failure_count</a></span>, <span class='object_link'><a href="../CircuitBreaker.html#half_open%3F-instance_method" title="SwitchGear::CircuitBreaker#half_open? (method)">#half_open?</a></span>, <span class='object_link'><a href="../CircuitBreaker.html#open%3F-instance_method" title="SwitchGear::CircuitBreaker#open? (method)">#open?</a></span></p>
|
405
|
+
<div id="constructor_details" class="method_details_list">
|
406
|
+
<h2>Constructor Details</h2>
|
407
|
+
|
408
|
+
<div class="method_details first">
|
409
|
+
<h3 class="signature first" id="initialize-instance_method">
|
410
|
+
|
411
|
+
#<strong>initialize</strong> {|circuit, failure_limit, reset_timeout, logger, client, namespace| ... } ⇒ <tt><span class='object_link'><a href="" title="SwitchGear::CircuitBreaker::Redis (class)">SwitchGear::CircuitBreaker::Redis</a></span></tt>
|
412
|
+
|
413
|
+
|
414
|
+
|
415
|
+
|
416
|
+
|
417
|
+
</h3><div class="docstring">
|
418
|
+
<div class="discussion">
|
419
|
+
|
420
|
+
<p>The main class to instantiate the CircuitBraker class.</p>
|
421
|
+
|
422
|
+
|
423
|
+
</div>
|
424
|
+
</div>
|
425
|
+
<div class="tags">
|
426
|
+
|
427
|
+
<div class="examples">
|
428
|
+
<p class="tag_title">Examples:</p>
|
429
|
+
|
430
|
+
|
431
|
+
<p class="example_title"><div class='inline'>
|
432
|
+
<p>create a new breaker</p>
|
433
|
+
</div></p>
|
434
|
+
|
435
|
+
<pre class="example code"><code><span class='id identifier rubyid_breaker'>breaker</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="../../SwitchGear.html" title="SwitchGear (module)">SwitchGear</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../CircuitBreaker.html" title="SwitchGear::CircuitBreaker (module)">CircuitBreaker</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="" title="SwitchGear::CircuitBreaker::Redis (class)">Redis</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_cb'>cb</span><span class='op'>|</span>
|
436
|
+
<span class='id identifier rubyid_cb'>cb</span><span class='period'>.</span><span class='id identifier rubyid_circuit'>circuit</span> <span class='op'>=</span> <span class='tlambda'>-></span> <span class='lparen'>(</span><span class='id identifier rubyid_arg'>arg</span><span class='rparen'>)</span> <span class='tlambeg'>{</span> <span class='id identifier rubyid_my_method'>my_method</span><span class='lparen'>(</span><span class='id identifier rubyid_arg'>arg</span><span class='rparen'>)</span> <span class='rbrace'>}</span>
|
437
|
+
<span class='id identifier rubyid_cb'>cb</span><span class='period'>.</span><span class='id identifier rubyid_failure_limit'>failure_limit</span> <span class='op'>=</span> <span class='int'>2</span>
|
438
|
+
<span class='id identifier rubyid_cb'>cb</span><span class='period'>.</span><span class='id identifier rubyid_reset_timeout'>reset_timeout</span> <span class='op'>=</span> <span class='int'>5</span>
|
439
|
+
<span class='id identifier rubyid_cb'>cb</span><span class='period'>.</span><span class='id identifier rubyid_client'>client</span> <span class='op'>=</span> <span class='id identifier rubyid_redis_client'>redis_client</span>
|
440
|
+
<span class='id identifier rubyid_cb'>cb</span><span class='period'>.</span><span class='id identifier rubyid_namespace'>namespace</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>some_key</span><span class='tstring_end'>"</span></span>
|
441
|
+
<span class='kw'>end</span></code></pre>
|
442
|
+
|
443
|
+
</div>
|
444
|
+
|
445
|
+
<p class="tag_title">Yield Parameters:</p>
|
446
|
+
<ul class="yieldparam">
|
447
|
+
|
448
|
+
<li>
|
449
|
+
|
450
|
+
<span class='name'>circuit</span>
|
451
|
+
|
452
|
+
|
453
|
+
<span class='type'></span>
|
454
|
+
|
455
|
+
|
456
|
+
|
457
|
+
—
|
458
|
+
<div class='inline'><ul><li>
|
459
|
+
<p>(look to <span class='object_link'><a href="#circuit-instance_method" title="SwitchGear::CircuitBreaker::Redis#circuit (method)">#circuit</a></span>)</p>
|
460
|
+
</li></ul>
|
461
|
+
</div>
|
462
|
+
|
463
|
+
</li>
|
464
|
+
|
465
|
+
<li>
|
466
|
+
|
467
|
+
<span class='name'>failure_limit</span>
|
468
|
+
|
469
|
+
|
470
|
+
<span class='type'></span>
|
471
|
+
|
472
|
+
|
473
|
+
|
474
|
+
—
|
475
|
+
<div class='inline'><ul><li>
|
476
|
+
<p>(look to <span class='object_link'><a href="#failure_limit-instance_method" title="SwitchGear::CircuitBreaker::Redis#failure_limit (method)">#failure_limit</a></span>)</p>
|
477
|
+
</li></ul>
|
478
|
+
</div>
|
479
|
+
|
480
|
+
</li>
|
481
|
+
|
482
|
+
<li>
|
483
|
+
|
484
|
+
<span class='name'>reset_timeout</span>
|
485
|
+
|
486
|
+
|
487
|
+
<span class='type'></span>
|
488
|
+
|
489
|
+
|
490
|
+
|
491
|
+
—
|
492
|
+
<div class='inline'><ul><li>
|
493
|
+
<p>(look to <span class='object_link'><a href="#reset_timeout-instance_method" title="SwitchGear::CircuitBreaker::Redis#reset_timeout (method)">#reset_timeout</a></span>)</p>
|
494
|
+
</li></ul>
|
495
|
+
</div>
|
496
|
+
|
497
|
+
</li>
|
498
|
+
|
499
|
+
<li>
|
500
|
+
|
501
|
+
<span class='name'>logger</span>
|
502
|
+
|
503
|
+
|
504
|
+
<span class='type'></span>
|
505
|
+
|
506
|
+
|
507
|
+
|
508
|
+
—
|
509
|
+
<div class='inline'><ul><li>
|
510
|
+
<p>(look to <span class='object_link'><a href="#logger-instance_method" title="SwitchGear::CircuitBreaker::Redis#logger (method)">#logger</a></span>)</p>
|
511
|
+
</li></ul>
|
512
|
+
</div>
|
513
|
+
|
514
|
+
</li>
|
515
|
+
|
516
|
+
<li>
|
517
|
+
|
518
|
+
<span class='name'>client</span>
|
519
|
+
|
520
|
+
|
521
|
+
<span class='type'></span>
|
522
|
+
|
523
|
+
|
524
|
+
|
525
|
+
—
|
526
|
+
<div class='inline'><ul><li>
|
527
|
+
<p>(look to <span class='object_link'><a href="#client-instance_method" title="SwitchGear::CircuitBreaker::Redis#client (method)">#client</a></span>)</p>
|
528
|
+
</li></ul>
|
529
|
+
</div>
|
530
|
+
|
531
|
+
</li>
|
532
|
+
|
533
|
+
<li>
|
534
|
+
|
535
|
+
<span class='name'>namespace</span>
|
536
|
+
|
537
|
+
|
538
|
+
<span class='type'></span>
|
539
|
+
|
540
|
+
|
541
|
+
|
542
|
+
—
|
543
|
+
<div class='inline'><ul><li>
|
544
|
+
<p>(look to <span class='object_link'><a href="#namespace-instance_method" title="SwitchGear::CircuitBreaker::Redis#namespace (method)">#namespace</a></span>)</p>
|
545
|
+
</li></ul>
|
546
|
+
</div>
|
547
|
+
|
548
|
+
</li>
|
549
|
+
|
550
|
+
</ul>
|
551
|
+
|
552
|
+
</div><table class="source_code">
|
553
|
+
<tr>
|
554
|
+
<td>
|
555
|
+
<pre class="lines">
|
556
|
+
|
557
|
+
|
558
|
+
49
|
559
|
+
50
|
560
|
+
51
|
561
|
+
52
|
562
|
+
53
|
563
|
+
54
|
564
|
+
55
|
565
|
+
56
|
566
|
+
57
|
567
|
+
58</pre>
|
568
|
+
</td>
|
569
|
+
<td>
|
570
|
+
<pre class="code"><span class="info file"># File 'lib/switch_gear/circuit_breaker/redis.rb', line 49</span>
|
571
|
+
|
572
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span>
|
573
|
+
<span class='kw'>yield</span> <span class='kw'>self</span>
|
574
|
+
<span class='ivar'>@client</span> <span class='op'>=</span> <span class='id identifier rubyid_client'>client</span>
|
575
|
+
<span class='ivar'>@namespace</span> <span class='op'>=</span> <span class='id identifier rubyid_namespace'>namespace</span>
|
576
|
+
<span class='ivar'>@failure_limit</span> <span class='op'>||=</span> <span class='int'>5</span>
|
577
|
+
<span class='ivar'>@reset_timeout</span> <span class='op'>||=</span> <span class='int'>10</span>
|
578
|
+
<span class='ivar'>@logger</span> <span class='op'>=</span> <span class='const'>Logger</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='const'>STDOUT</span><span class='rparen'>)</span>
|
579
|
+
<span class='id identifier rubyid_run_validations'>run_validations</span>
|
580
|
+
<span class='ivar'>@namespace</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>circuit_breaker:</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_namespace'>namespace</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span>
|
581
|
+
<span class='kw'>end</span></pre>
|
582
|
+
</td>
|
583
|
+
</tr>
|
584
|
+
</table>
|
585
|
+
</div>
|
586
|
+
|
587
|
+
</div>
|
588
|
+
|
589
|
+
<div id="instance_attr_details" class="attr_details">
|
590
|
+
<h2>Instance Attribute Details</h2>
|
591
|
+
|
592
|
+
|
593
|
+
<span id="circuit=-instance_method"></span>
|
594
|
+
<div class="method_details first">
|
595
|
+
<h3 class="signature first" id="circuit-instance_method">
|
596
|
+
|
597
|
+
#<strong>circuit</strong> ⇒ <tt>Object</tt>
|
598
|
+
|
599
|
+
|
600
|
+
|
601
|
+
|
602
|
+
|
603
|
+
</h3><div class="docstring">
|
604
|
+
<div class="discussion">
|
605
|
+
|
606
|
+
<p>(look to <span class='object_link'><a href="Memory.html#circuit-instance_method" title="SwitchGear::CircuitBreaker::Memory#circuit (method)">Memory#circuit</a></span>)</p>
|
607
|
+
|
608
|
+
|
609
|
+
</div>
|
610
|
+
</div>
|
611
|
+
<div class="tags">
|
612
|
+
|
613
|
+
|
614
|
+
</div><table class="source_code">
|
615
|
+
<tr>
|
616
|
+
<td>
|
617
|
+
<pre class="lines">
|
618
|
+
|
619
|
+
|
620
|
+
6
|
621
|
+
7
|
622
|
+
8</pre>
|
623
|
+
</td>
|
624
|
+
<td>
|
625
|
+
<pre class="code"><span class="info file"># File 'lib/switch_gear/circuit_breaker/redis.rb', line 6</span>
|
626
|
+
|
627
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_circuit'>circuit</span>
|
628
|
+
<span class='ivar'>@circuit</span>
|
629
|
+
<span class='kw'>end</span></pre>
|
630
|
+
</td>
|
631
|
+
</tr>
|
632
|
+
</table>
|
633
|
+
</div>
|
634
|
+
|
635
|
+
|
636
|
+
<span id="client=-instance_method"></span>
|
637
|
+
<div class="method_details ">
|
638
|
+
<h3 class="signature " id="client-instance_method">
|
639
|
+
|
640
|
+
#<strong>client</strong> ⇒ <tt>Object</tt>
|
641
|
+
|
642
|
+
|
643
|
+
|
644
|
+
|
645
|
+
|
646
|
+
</h3><div class="docstring">
|
647
|
+
<div class="discussion">
|
648
|
+
|
649
|
+
<p>An instance of an redis client. This library does not have a hard
|
650
|
+
dependency on a particular redis client but for testing I've used
|
651
|
+
[redis-rb](<a
|
652
|
+
href="https://github.com/redis/redis-rb">github.com/redis/redis-rb</a>).
|
653
|
+
Whatever you pass in here simply has to implement a few redis commands such
|
654
|
+
as `sadd`, `del`, `smembers`, `get` and `set`. The client will ensure these
|
655
|
+
exist before the breaker can be instantiated.</p>
|
656
|
+
|
657
|
+
|
658
|
+
</div>
|
659
|
+
</div>
|
660
|
+
<div class="tags">
|
661
|
+
|
662
|
+
<p class="tag_title">Returns:</p>
|
663
|
+
<ul class="return">
|
664
|
+
|
665
|
+
<li>
|
666
|
+
|
667
|
+
|
668
|
+
<span class='type'>(<tt>Object</tt>)</span>
|
669
|
+
|
670
|
+
|
671
|
+
|
672
|
+
—
|
673
|
+
<div class='inline'><ul><li>
|
674
|
+
<p>redis client given</p>
|
675
|
+
</li></ul>
|
676
|
+
</div>
|
677
|
+
|
678
|
+
</li>
|
679
|
+
|
680
|
+
</ul>
|
681
|
+
|
682
|
+
</div><table class="source_code">
|
683
|
+
<tr>
|
684
|
+
<td>
|
685
|
+
<pre class="lines">
|
686
|
+
|
687
|
+
|
688
|
+
29
|
689
|
+
30
|
690
|
+
31</pre>
|
691
|
+
</td>
|
692
|
+
<td>
|
693
|
+
<pre class="code"><span class="info file"># File 'lib/switch_gear/circuit_breaker/redis.rb', line 29</span>
|
694
|
+
|
695
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_client'>client</span>
|
696
|
+
<span class='ivar'>@client</span>
|
697
|
+
<span class='kw'>end</span></pre>
|
698
|
+
</td>
|
699
|
+
</tr>
|
700
|
+
</table>
|
701
|
+
</div>
|
702
|
+
|
703
|
+
|
704
|
+
<span id="failure_limit=-instance_method"></span>
|
705
|
+
<div class="method_details ">
|
706
|
+
<h3 class="signature " id="failure_limit-instance_method">
|
707
|
+
|
708
|
+
#<strong>failure_limit</strong> ⇒ <tt>Object</tt>
|
709
|
+
|
710
|
+
|
711
|
+
|
712
|
+
|
713
|
+
|
714
|
+
</h3><div class="docstring">
|
715
|
+
<div class="discussion">
|
716
|
+
|
717
|
+
<p>(look to <span class='object_link'><a href="Memory.html#failure_limit-instance_method" title="SwitchGear::CircuitBreaker::Memory#failure_limit (method)">Memory#failure_limit</a></span>)</p>
|
718
|
+
|
719
|
+
|
720
|
+
</div>
|
721
|
+
</div>
|
722
|
+
<div class="tags">
|
723
|
+
|
724
|
+
|
725
|
+
</div><table class="source_code">
|
726
|
+
<tr>
|
727
|
+
<td>
|
728
|
+
<pre class="lines">
|
729
|
+
|
730
|
+
|
731
|
+
8
|
732
|
+
9
|
733
|
+
10</pre>
|
734
|
+
</td>
|
735
|
+
<td>
|
736
|
+
<pre class="code"><span class="info file"># File 'lib/switch_gear/circuit_breaker/redis.rb', line 8</span>
|
737
|
+
|
738
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_failure_limit'>failure_limit</span>
|
739
|
+
<span class='ivar'>@failure_limit</span>
|
740
|
+
<span class='kw'>end</span></pre>
|
741
|
+
</td>
|
742
|
+
</tr>
|
743
|
+
</table>
|
744
|
+
</div>
|
745
|
+
|
746
|
+
|
747
|
+
<span id="failures=-instance_method"></span>
|
748
|
+
<div class="method_details ">
|
749
|
+
<h3 class="signature " id="failures-instance_method">
|
750
|
+
|
751
|
+
#<strong>failures</strong> ⇒ <tt>Object</tt>
|
752
|
+
|
753
|
+
|
754
|
+
|
755
|
+
|
756
|
+
|
757
|
+
</h3><div class="docstring">
|
758
|
+
<div class="discussion">
|
759
|
+
|
760
|
+
<p>(look to <span class='object_link'><a href="Memory.html#failures-instance_method" title="SwitchGear::CircuitBreaker::Memory#failures (method)">Memory#failures</a></span>)</p>
|
761
|
+
|
762
|
+
|
763
|
+
</div>
|
764
|
+
</div>
|
765
|
+
<div class="tags">
|
766
|
+
|
767
|
+
|
768
|
+
</div><table class="source_code">
|
769
|
+
<tr>
|
770
|
+
<td>
|
771
|
+
<pre class="lines">
|
772
|
+
|
773
|
+
|
774
|
+
16
|
775
|
+
17
|
776
|
+
18</pre>
|
777
|
+
</td>
|
778
|
+
<td>
|
779
|
+
<pre class="code"><span class="info file"># File 'lib/switch_gear/circuit_breaker/redis.rb', line 16</span>
|
780
|
+
|
781
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_failures'>failures</span>
|
782
|
+
<span class='ivar'>@failures</span>
|
783
|
+
<span class='kw'>end</span></pre>
|
784
|
+
</td>
|
785
|
+
</tr>
|
786
|
+
</table>
|
787
|
+
</div>
|
788
|
+
|
789
|
+
|
790
|
+
<span id="logger=-instance_method"></span>
|
791
|
+
<div class="method_details ">
|
792
|
+
<h3 class="signature " id="logger-instance_method">
|
793
|
+
|
794
|
+
#<strong>logger</strong> ⇒ <tt>Object</tt>
|
795
|
+
|
796
|
+
|
797
|
+
|
798
|
+
|
799
|
+
|
800
|
+
</h3><div class="docstring">
|
801
|
+
<div class="discussion">
|
802
|
+
|
803
|
+
<p>(look to <span class='object_link'><a href="Memory.html#logger-instance_method" title="SwitchGear::CircuitBreaker::Memory#logger (method)">Memory#logger</a></span>)</p>
|
804
|
+
|
805
|
+
|
806
|
+
</div>
|
807
|
+
</div>
|
808
|
+
<div class="tags">
|
809
|
+
|
810
|
+
|
811
|
+
</div><table class="source_code">
|
812
|
+
<tr>
|
813
|
+
<td>
|
814
|
+
<pre class="lines">
|
815
|
+
|
816
|
+
|
817
|
+
12
|
818
|
+
13
|
819
|
+
14</pre>
|
820
|
+
</td>
|
821
|
+
<td>
|
822
|
+
<pre class="code"><span class="info file"># File 'lib/switch_gear/circuit_breaker/redis.rb', line 12</span>
|
823
|
+
|
824
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_logger'>logger</span>
|
825
|
+
<span class='ivar'>@logger</span>
|
826
|
+
<span class='kw'>end</span></pre>
|
827
|
+
</td>
|
828
|
+
</tr>
|
829
|
+
</table>
|
830
|
+
</div>
|
831
|
+
|
832
|
+
|
833
|
+
<span id="namespace=-instance_method"></span>
|
834
|
+
<div class="method_details ">
|
835
|
+
<h3 class="signature " id="namespace-instance_method">
|
836
|
+
|
837
|
+
#<strong>namespace</strong> ⇒ <tt>String</tt>
|
838
|
+
|
839
|
+
|
840
|
+
|
841
|
+
|
842
|
+
|
843
|
+
</h3><div class="docstring">
|
844
|
+
<div class="discussion">
|
845
|
+
|
846
|
+
<p>A unique name that will be used across servers to sync state and failures.
|
847
|
+
I'd recommend `your_class.name:your_method_name` or whatever is special
|
848
|
+
about what's being invoked in the `circuit`. See
|
849
|
+
examples/example_redis.rb</p>
|
850
|
+
|
851
|
+
|
852
|
+
</div>
|
853
|
+
</div>
|
854
|
+
<div class="tags">
|
855
|
+
|
856
|
+
<p class="tag_title">Returns:</p>
|
857
|
+
<ul class="return">
|
858
|
+
|
859
|
+
<li>
|
860
|
+
|
861
|
+
|
862
|
+
<span class='type'>(<tt>String</tt>)</span>
|
863
|
+
|
864
|
+
|
865
|
+
|
866
|
+
—
|
867
|
+
<div class='inline'><ul><li>
|
868
|
+
<p>namespace given</p>
|
869
|
+
</li></ul>
|
870
|
+
</div>
|
871
|
+
|
872
|
+
</li>
|
873
|
+
|
874
|
+
</ul>
|
875
|
+
|
876
|
+
</div><table class="source_code">
|
877
|
+
<tr>
|
878
|
+
<td>
|
879
|
+
<pre class="lines">
|
880
|
+
|
881
|
+
|
882
|
+
21
|
883
|
+
22
|
884
|
+
23</pre>
|
885
|
+
</td>
|
886
|
+
<td>
|
887
|
+
<pre class="code"><span class="info file"># File 'lib/switch_gear/circuit_breaker/redis.rb', line 21</span>
|
888
|
+
|
889
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_namespace'>namespace</span>
|
890
|
+
<span class='ivar'>@namespace</span>
|
891
|
+
<span class='kw'>end</span></pre>
|
892
|
+
</td>
|
893
|
+
</tr>
|
894
|
+
</table>
|
895
|
+
</div>
|
896
|
+
|
897
|
+
|
898
|
+
<span id="reset_timeout=-instance_method"></span>
|
899
|
+
<div class="method_details ">
|
900
|
+
<h3 class="signature " id="reset_timeout-instance_method">
|
901
|
+
|
902
|
+
#<strong>reset_timeout</strong> ⇒ <tt>Object</tt>
|
903
|
+
|
904
|
+
|
905
|
+
|
906
|
+
|
907
|
+
|
908
|
+
</h3><div class="docstring">
|
909
|
+
<div class="discussion">
|
910
|
+
|
911
|
+
<p>(look to <span class='object_link'><a href="Memory.html#reset_timeout-instance_method" title="SwitchGear::CircuitBreaker::Memory#reset_timeout (method)">Memory#reset_timeout</a></span>)</p>
|
912
|
+
|
913
|
+
|
914
|
+
</div>
|
915
|
+
</div>
|
916
|
+
<div class="tags">
|
917
|
+
|
918
|
+
|
919
|
+
</div><table class="source_code">
|
920
|
+
<tr>
|
921
|
+
<td>
|
922
|
+
<pre class="lines">
|
923
|
+
|
924
|
+
|
925
|
+
10
|
926
|
+
11
|
927
|
+
12</pre>
|
928
|
+
</td>
|
929
|
+
<td>
|
930
|
+
<pre class="code"><span class="info file"># File 'lib/switch_gear/circuit_breaker/redis.rb', line 10</span>
|
931
|
+
|
932
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_reset_timeout'>reset_timeout</span>
|
933
|
+
<span class='ivar'>@reset_timeout</span>
|
934
|
+
<span class='kw'>end</span></pre>
|
935
|
+
</td>
|
936
|
+
</tr>
|
937
|
+
</table>
|
938
|
+
</div>
|
939
|
+
|
940
|
+
|
941
|
+
<span id="state=-instance_method"></span>
|
942
|
+
<div class="method_details ">
|
943
|
+
<h3 class="signature " id="state-instance_method">
|
944
|
+
|
945
|
+
#<strong>state</strong> ⇒ <tt>Object</tt>
|
946
|
+
|
947
|
+
|
948
|
+
|
949
|
+
|
950
|
+
|
951
|
+
</h3><div class="docstring">
|
952
|
+
<div class="discussion">
|
953
|
+
|
954
|
+
<p>(look to <span class='object_link'><a href="Memory.html#state-instance_method" title="SwitchGear::CircuitBreaker::Memory#state (method)">Memory#state</a></span>)</p>
|
955
|
+
|
956
|
+
|
957
|
+
</div>
|
958
|
+
</div>
|
959
|
+
<div class="tags">
|
960
|
+
|
961
|
+
|
962
|
+
</div><table class="source_code">
|
963
|
+
<tr>
|
964
|
+
<td>
|
965
|
+
<pre class="lines">
|
966
|
+
|
967
|
+
|
968
|
+
14
|
969
|
+
15
|
970
|
+
16</pre>
|
971
|
+
</td>
|
972
|
+
<td>
|
973
|
+
<pre class="code"><span class="info file"># File 'lib/switch_gear/circuit_breaker/redis.rb', line 14</span>
|
974
|
+
|
975
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_state'>state</span>
|
976
|
+
<span class='ivar'>@state</span>
|
977
|
+
<span class='kw'>end</span></pre>
|
978
|
+
</td>
|
979
|
+
</tr>
|
980
|
+
</table>
|
981
|
+
</div>
|
982
|
+
|
983
|
+
</div>
|
984
|
+
|
985
|
+
|
986
|
+
<div id="instance_method_details" class="method_details_list">
|
987
|
+
<h2>Instance Method Details</h2>
|
988
|
+
|
989
|
+
|
990
|
+
<div class="method_details first">
|
991
|
+
<h3 class="signature first" id="add_failure-instance_method">
|
992
|
+
|
993
|
+
#<strong>add_failure</strong>(failure) ⇒ <tt>Object</tt>
|
994
|
+
|
995
|
+
|
996
|
+
|
997
|
+
|
998
|
+
|
999
|
+
</h3><table class="source_code">
|
1000
|
+
<tr>
|
1001
|
+
<td>
|
1002
|
+
<pre class="lines">
|
1003
|
+
|
1004
|
+
|
1005
|
+
79
|
1006
|
+
80
|
1007
|
+
81</pre>
|
1008
|
+
</td>
|
1009
|
+
<td>
|
1010
|
+
<pre class="code"><span class="info file"># File 'lib/switch_gear/circuit_breaker/redis.rb', line 79</span>
|
1011
|
+
|
1012
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_add_failure'>add_failure</span><span class='lparen'>(</span><span class='id identifier rubyid_failure'>failure</span><span class='rparen'>)</span>
|
1013
|
+
<span class='id identifier rubyid_client'>client</span><span class='period'>.</span><span class='id identifier rubyid_sadd'>sadd</span><span class='lparen'>(</span><span class='id identifier rubyid_fail_namespace'>fail_namespace</span><span class='comma'>,</span> <span class='id identifier rubyid_failure'>failure</span><span class='period'>.</span><span class='id identifier rubyid_to_json'>to_json</span><span class='rparen'>)</span>
|
1014
|
+
<span class='kw'>end</span></pre>
|
1015
|
+
</td>
|
1016
|
+
</tr>
|
1017
|
+
</table>
|
1018
|
+
</div>
|
1019
|
+
|
1020
|
+
</div>
|
1021
|
+
|
1022
|
+
</div>
|
1023
|
+
|
1024
|
+
<div id="footer">
|
1025
|
+
Generated on Fri May 26 06:53:24 2017 by
|
1026
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
1027
|
+
0.9.8 (ruby-2.4.0).
|
1028
|
+
</div>
|
1029
|
+
|
1030
|
+
</div>
|
1031
|
+
</body>
|
1032
|
+
</html>
|