thinner 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,592 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
+ <head>
5
+ <meta name="Content-Type" content="text/html; charset=utf-8" />
6
+ <title>Class: Thinner::Configuration</title>
7
+ <link rel="stylesheet" href="../css/style.css" type="text/css" media="screen" charset="utf-8" />
8
+ <link rel="stylesheet" href="../css/common.css" type="text/css" media="screen" charset="utf-8" />
9
+
10
+ <script type="text/javascript" charset="utf-8">
11
+ relpath = '..';
12
+ if (relpath != '') relpath += '/';
13
+ </script>
14
+ <script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
15
+ <script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
16
+
17
+ </head>
18
+ <body>
19
+ <script type="text/javascript" charset="utf-8">
20
+ if (window.top.frames.main) document.body.className = 'frames';
21
+ </script>
22
+
23
+ <div id="header">
24
+ <div id="menu">
25
+
26
+ <a href="../_index.html">Index (C)</a> &raquo;
27
+ <span class='title'><span class='object_link'><a href="../Thinner.html" title="Thinner (module)">Thinner</a></span></span>
28
+ &raquo;
29
+ <span class="title">Configuration</span>
30
+
31
+
32
+ <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
33
+ </div>
34
+
35
+ <div id="search">
36
+ <a id="class_list_link" href="#">Class List</a>
37
+ <a id="method_list_link" href="#">Method List</a>
38
+ <a id ="file_list_link" href="#">File List</a>
39
+ </div>
40
+
41
+ <div class="clear"></div>
42
+ </div>
43
+
44
+ <iframe id="search_frame"></iframe>
45
+
46
+ <div id="content"><h1>Class: Thinner::Configuration
47
+
48
+
49
+
50
+ </h1>
51
+
52
+ <dl class="box">
53
+
54
+ <dt class="r1">Inherits:</dt>
55
+ <dd class="r1">
56
+ <span class="inheritName">Object</span>
57
+
58
+ <ul class="fullTree">
59
+ <li>Object</li>
60
+
61
+ <li class="next">Thinner::Configuration</li>
62
+
63
+ </ul>
64
+ <a href="#" class="inheritanceTree">show all</a>
65
+
66
+ </dd>
67
+
68
+
69
+
70
+
71
+
72
+
73
+
74
+
75
+
76
+ <dt class="r2 last">Defined in:</dt>
77
+ <dd class="r2 last">lib/thinner/configuration.rb</dd>
78
+
79
+ </dl>
80
+ <div class="clear"></div>
81
+
82
+ <h2>Overview</h2><div class="docstring">
83
+ <div class="discussion">
84
+ <p>
85
+ Thinner::Configuration holds the various settings for Thinner
86
+ </p>
87
+
88
+
89
+ </div>
90
+ </div>
91
+ <div class="tags">
92
+
93
+ </div>
94
+
95
+ <h2>Instance Attribute Summary <small>(<a href="#" class="summary_toggle">collapse</a>)</small></h2>
96
+ <ul class="summary">
97
+
98
+ <li class="public ">
99
+ <span class="summary_signature">
100
+
101
+ <a href="#batch_length-instance_method" title="#batch_length (instance method)">- (Object) <strong>batch_length</strong> </a>
102
+
103
+
104
+
105
+ </span>
106
+
107
+
108
+
109
+
110
+
111
+
112
+
113
+
114
+
115
+
116
+
117
+ <span class="summary_desc"><div class='inline'><p>
118
+ Returns the value of attribute batch_length.
119
+ </p>
120
+ </div></span>
121
+
122
+ </li>
123
+
124
+
125
+ <li class="public ">
126
+ <span class="summary_signature">
127
+
128
+ <a href="#log_file-instance_method" title="#log_file (instance method)">- (Object) <strong>log_file</strong> </a>
129
+
130
+
131
+
132
+ </span>
133
+
134
+
135
+
136
+
137
+
138
+
139
+
140
+
141
+
142
+
143
+
144
+ <span class="summary_desc"><div class='inline'><p>
145
+ Returns the value of attribute log_file.
146
+ </p>
147
+ </div></span>
148
+
149
+ </li>
150
+
151
+
152
+ <li class="public ">
153
+ <span class="summary_signature">
154
+
155
+ <a href="#no_kill-instance_method" title="#no_kill (instance method)">- (Object) <strong>no_kill</strong> </a>
156
+
157
+
158
+
159
+ </span>
160
+
161
+
162
+
163
+
164
+
165
+
166
+
167
+
168
+
169
+
170
+
171
+ <span class="summary_desc"><div class='inline'><p>
172
+ Returns the value of attribute no_kill.
173
+ </p>
174
+ </div></span>
175
+
176
+ </li>
177
+
178
+
179
+ <li class="public ">
180
+ <span class="summary_signature">
181
+
182
+ <a href="#server-instance_method" title="#server (instance method)">- (Object) <strong>server</strong> </a>
183
+
184
+
185
+
186
+ </span>
187
+
188
+
189
+
190
+
191
+
192
+
193
+
194
+
195
+
196
+
197
+
198
+ <span class="summary_desc"><div class='inline'><p>
199
+ Returns the value of attribute server.
200
+ </p>
201
+ </div></span>
202
+
203
+ </li>
204
+
205
+
206
+ <li class="public ">
207
+ <span class="summary_signature">
208
+
209
+ <a href="#sleep_time-instance_method" title="#sleep_time (instance method)">- (Object) <strong>sleep_time</strong> </a>
210
+
211
+
212
+
213
+ </span>
214
+
215
+
216
+
217
+
218
+
219
+
220
+
221
+
222
+
223
+
224
+
225
+ <span class="summary_desc"><div class='inline'><p>
226
+ Returns the value of attribute sleep_time.
227
+ </p>
228
+ </div></span>
229
+
230
+ </li>
231
+
232
+
233
+ </ul>
234
+
235
+
236
+
237
+ <h2>
238
+ Instance Method Summary
239
+ <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
240
+ </h2>
241
+
242
+ <ul class="summary">
243
+
244
+ <li class="public ">
245
+ <span class="summary_signature">
246
+
247
+ <a href="#initialize-instance_method" title="#initialize (instance method)">- (Configuration) <strong>initialize</strong> </a>
248
+
249
+
250
+
251
+ </span>
252
+
253
+ <span class="note title constructor">constructor</span>
254
+
255
+
256
+
257
+
258
+
259
+
260
+
261
+
262
+ <span class="summary_desc"><div class='inline'><p>
263
+ Create a Thinner::Configuration instance with sane defaults.
264
+ </p>
265
+ </div></span>
266
+
267
+ </li>
268
+
269
+
270
+ </ul>
271
+
272
+
273
+ <div id="constructor_details" class="method_details_list">
274
+ <h2>Constructor Details</h2>
275
+
276
+ <div class="method_details first">
277
+ <p class="signature first" id="initialize-instance_method">
278
+
279
+ - (<tt><span class='object_link'><a href="" title="Thinner::Configuration (class)">Configuration</a></span></tt>) <strong>initialize</strong>
280
+
281
+
282
+
283
+ </p><div class="docstring">
284
+ <div class="discussion">
285
+ <p>
286
+ Create a Thinner::Configuration instance with sane defaults.
287
+ </p>
288
+
289
+
290
+ </div>
291
+ </div>
292
+ <div class="tags">
293
+
294
+ </div><table class="source_code">
295
+ <tr>
296
+ <td>
297
+ <pre class="lines">
298
+
299
+
300
+ 9
301
+ 10
302
+ 11
303
+ 12
304
+ 13
305
+ 14
306
+ 15
307
+ 16
308
+ 17
309
+ 18
310
+ 19
311
+ 20
312
+ 21
313
+ 22
314
+ 23
315
+ 24
316
+ 25
317
+ 26
318
+ 27
319
+ 28
320
+ 29
321
+ 30
322
+ 31
323
+ 32
324
+ 33</pre>
325
+ </td>
326
+ <td>
327
+ <pre class="code"><span class="info file"># File 'lib/thinner/configuration.rb', line 9</span>
328
+
329
+ <span class='def def kw'>def</span> <span class='initialize identifier id'>initialize</span>
330
+ <span class='comment val'># Number of urls to purge at one time. These purge requests are fired in quick</span>
331
+ <span class='comment val'># succession. Thinner is perfectly capable of killing a Varnish server, by</span>
332
+ <span class='comment val'># overloading the worker thread, so be really conservative with this option.</span>
333
+ <span class='@batch_length ivar id'>@batch_length</span> <span class='assign token'>=</span> <span class='integer val'>10</span>
334
+
335
+ <span class='comment val'># The amount of time to sleep between purges in seconds.</span>
336
+ <span class='@sleep_time ivar id'>@sleep_time</span> <span class='assign token'>=</span> <span class='integer val'>1</span>
337
+
338
+ <span class='comment val'># The server address and management port. See:</span>
339
+ <span class='comment val'># http://www.varnish-cache.org/trac/wiki/ManagementPort</span>
340
+ <span class='comment val'># for details.</span>
341
+ <span class='@server ivar id'>@server</span> <span class='assign token'>=</span> <span class='string val'>&quot;127.0.0.1:6082&quot;</span>
342
+
343
+ <span class='comment val'># By default, every time you call Thinner.purge! thinner spins off a new</span>
344
+ <span class='comment val'># instance of Thinner::Client and terminates any old instances that are</span>
345
+ <span class='comment val'># running. If you want to have overlapping instances set this to true.</span>
346
+ <span class='comment val'># It's not recommended to have multiple Thinner::Client's running at the</span>
347
+ <span class='comment val'># same time.</span>
348
+ <span class='@no_kill ivar id'>@no_kill</span> <span class='assign token'>=</span> <span class='false false kw'>false</span>
349
+
350
+ <span class='comment val'># The log file (either a string or file object) to log the current batch to.</span>
351
+ <span class='comment val'># Defaults to STDOUT</span>
352
+ <span class='@log_file ivar id'>@log_file</span> <span class='assign token'>=</span> <span class='STDOUT constant id'>STDOUT</span>
353
+ <span class='end end kw'>end</span>
354
+ </pre>
355
+ </td>
356
+ </tr>
357
+ </table>
358
+ </div>
359
+
360
+ </div>
361
+
362
+ <div id="instance_attr_details" class="attr_details">
363
+ <h2>Instance Attribute Details</h2>
364
+
365
+
366
+ <span id="batch_length=-instance_method"></span>
367
+ <span id="batch_length-instance_method"></span>
368
+ <div class="method_details first">
369
+ <p class="signature first" id="batch_length-instance_method">
370
+
371
+ - (<tt>Object</tt>) <strong>batch_length</strong>
372
+
373
+
374
+
375
+ </p><div class="docstring">
376
+ <div class="discussion">
377
+ <p>
378
+ Returns the value of attribute batch_length
379
+ </p>
380
+
381
+
382
+ </div>
383
+ </div>
384
+ <div class="tags">
385
+
386
+ </div><table class="source_code">
387
+ <tr>
388
+ <td>
389
+ <pre class="lines">
390
+
391
+
392
+ 6
393
+ 7
394
+ 8</pre>
395
+ </td>
396
+ <td>
397
+ <pre class="code"><span class="info file"># File 'lib/thinner/configuration.rb', line 6</span>
398
+
399
+ <span class='def def kw'>def</span> <span class='batch_length identifier id'>batch_length</span>
400
+ <span class='@batch_length ivar id'>@batch_length</span>
401
+ <span class='end end kw'>end</span>
402
+ </pre>
403
+ </td>
404
+ </tr>
405
+ </table>
406
+ </div>
407
+
408
+
409
+ <span id="log_file=-instance_method"></span>
410
+ <span id="log_file-instance_method"></span>
411
+ <div class="method_details ">
412
+ <p class="signature " id="log_file-instance_method">
413
+
414
+ - (<tt>Object</tt>) <strong>log_file</strong>
415
+
416
+
417
+
418
+ </p><div class="docstring">
419
+ <div class="discussion">
420
+ <p>
421
+ Returns the value of attribute log_file
422
+ </p>
423
+
424
+
425
+ </div>
426
+ </div>
427
+ <div class="tags">
428
+
429
+ </div><table class="source_code">
430
+ <tr>
431
+ <td>
432
+ <pre class="lines">
433
+
434
+
435
+ 6
436
+ 7
437
+ 8</pre>
438
+ </td>
439
+ <td>
440
+ <pre class="code"><span class="info file"># File 'lib/thinner/configuration.rb', line 6</span>
441
+
442
+ <span class='def def kw'>def</span> <span class='log_file identifier id'>log_file</span>
443
+ <span class='@log_file ivar id'>@log_file</span>
444
+ <span class='end end kw'>end</span>
445
+ </pre>
446
+ </td>
447
+ </tr>
448
+ </table>
449
+ </div>
450
+
451
+
452
+ <span id="no_kill=-instance_method"></span>
453
+ <span id="no_kill-instance_method"></span>
454
+ <div class="method_details ">
455
+ <p class="signature " id="no_kill-instance_method">
456
+
457
+ - (<tt>Object</tt>) <strong>no_kill</strong>
458
+
459
+
460
+
461
+ </p><div class="docstring">
462
+ <div class="discussion">
463
+ <p>
464
+ Returns the value of attribute no_kill
465
+ </p>
466
+
467
+
468
+ </div>
469
+ </div>
470
+ <div class="tags">
471
+
472
+ </div><table class="source_code">
473
+ <tr>
474
+ <td>
475
+ <pre class="lines">
476
+
477
+
478
+ 6
479
+ 7
480
+ 8</pre>
481
+ </td>
482
+ <td>
483
+ <pre class="code"><span class="info file"># File 'lib/thinner/configuration.rb', line 6</span>
484
+
485
+ <span class='def def kw'>def</span> <span class='no_kill identifier id'>no_kill</span>
486
+ <span class='@no_kill ivar id'>@no_kill</span>
487
+ <span class='end end kw'>end</span>
488
+ </pre>
489
+ </td>
490
+ </tr>
491
+ </table>
492
+ </div>
493
+
494
+
495
+ <span id="server=-instance_method"></span>
496
+ <span id="server-instance_method"></span>
497
+ <div class="method_details ">
498
+ <p class="signature " id="server-instance_method">
499
+
500
+ - (<tt>Object</tt>) <strong>server</strong>
501
+
502
+
503
+
504
+ </p><div class="docstring">
505
+ <div class="discussion">
506
+ <p>
507
+ Returns the value of attribute server
508
+ </p>
509
+
510
+
511
+ </div>
512
+ </div>
513
+ <div class="tags">
514
+
515
+ </div><table class="source_code">
516
+ <tr>
517
+ <td>
518
+ <pre class="lines">
519
+
520
+
521
+ 6
522
+ 7
523
+ 8</pre>
524
+ </td>
525
+ <td>
526
+ <pre class="code"><span class="info file"># File 'lib/thinner/configuration.rb', line 6</span>
527
+
528
+ <span class='def def kw'>def</span> <span class='server identifier id'>server</span>
529
+ <span class='@server ivar id'>@server</span>
530
+ <span class='end end kw'>end</span>
531
+ </pre>
532
+ </td>
533
+ </tr>
534
+ </table>
535
+ </div>
536
+
537
+
538
+ <span id="sleep_time=-instance_method"></span>
539
+ <span id="sleep_time-instance_method"></span>
540
+ <div class="method_details ">
541
+ <p class="signature " id="sleep_time-instance_method">
542
+
543
+ - (<tt>Object</tt>) <strong>sleep_time</strong>
544
+
545
+
546
+
547
+ </p><div class="docstring">
548
+ <div class="discussion">
549
+ <p>
550
+ Returns the value of attribute sleep_time
551
+ </p>
552
+
553
+
554
+ </div>
555
+ </div>
556
+ <div class="tags">
557
+
558
+ </div><table class="source_code">
559
+ <tr>
560
+ <td>
561
+ <pre class="lines">
562
+
563
+
564
+ 6
565
+ 7
566
+ 8</pre>
567
+ </td>
568
+ <td>
569
+ <pre class="code"><span class="info file"># File 'lib/thinner/configuration.rb', line 6</span>
570
+
571
+ <span class='def def kw'>def</span> <span class='sleep_time identifier id'>sleep_time</span>
572
+ <span class='@sleep_time ivar id'>@sleep_time</span>
573
+ <span class='end end kw'>end</span>
574
+ </pre>
575
+ </td>
576
+ </tr>
577
+ </table>
578
+ </div>
579
+
580
+ </div>
581
+
582
+
583
+ </div>
584
+
585
+ <div id="footer">
586
+ Generated on Tue Nov 2 14:25:50 2010 by
587
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
588
+ 0.6.1 (ruby-1.8.7).
589
+ </div>
590
+
591
+ </body>
592
+ </html>