triglav-agent 1.0.0.pre1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (68) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +11 -0
  3. data/.rspec +2 -0
  4. data/.travis.yml +6 -0
  5. data/.yardopts +6 -0
  6. data/CHANGELOG.md +3 -0
  7. data/CODE_OF_CONDUCT.md +49 -0
  8. data/Gemfile +5 -0
  9. data/LICENSE.txt +21 -0
  10. data/README.md +59 -0
  11. data/Rakefile +11 -0
  12. data/bin/console +14 -0
  13. data/bin/setup +8 -0
  14. data/docs/Triglav/Agent/ApiClient/AuthenticationError.html +150 -0
  15. data/docs/Triglav/Agent/ApiClient/ConnectionError.html +150 -0
  16. data/docs/Triglav/Agent/ApiClient/Error.html +296 -0
  17. data/docs/Triglav/Agent/ApiClient.html +545 -0
  18. data/docs/Triglav/Agent/Base/CLI.html +498 -0
  19. data/docs/Triglav/Agent/Base/Connection.html +258 -0
  20. data/docs/Triglav/Agent/Base/Monitor.html +370 -0
  21. data/docs/Triglav/Agent/Base/Processor.html +623 -0
  22. data/docs/Triglav/Agent/Base/Setting.html +1081 -0
  23. data/docs/Triglav/Agent/Base/Worker.html +635 -0
  24. data/docs/Triglav/Agent/Base.html +121 -0
  25. data/docs/Triglav/Agent/Configuration.html +967 -0
  26. data/docs/Triglav/Agent/Error.html +130 -0
  27. data/docs/Triglav/Agent/HashUtil.html +351 -0
  28. data/docs/Triglav/Agent/LogFormatter.html +271 -0
  29. data/docs/Triglav/Agent/Logger.html +287 -0
  30. data/docs/Triglav/Agent/StorageFile.html +1130 -0
  31. data/docs/Triglav/Agent/Timer.html +424 -0
  32. data/docs/Triglav/Agent/TooManyError.html +134 -0
  33. data/docs/Triglav/Agent.html +131 -0
  34. data/docs/Triglav.html +119 -0
  35. data/docs/_index.html +335 -0
  36. data/docs/class_list.html +51 -0
  37. data/docs/css/common.css +1 -0
  38. data/docs/css/full_list.css +58 -0
  39. data/docs/css/style.css +481 -0
  40. data/docs/file.LICENSE.html +72 -0
  41. data/docs/file.README.html +137 -0
  42. data/docs/file_list.html +61 -0
  43. data/docs/frames.html +17 -0
  44. data/docs/index.html +137 -0
  45. data/docs/js/app.js +243 -0
  46. data/docs/js/full_list.js +216 -0
  47. data/docs/js/jquery.js +4 -0
  48. data/docs/method_list.html +659 -0
  49. data/docs/top-level-namespace.html +112 -0
  50. data/example/config.yml +40 -0
  51. data/lib/triglav/agent/api_client.rb +199 -0
  52. data/lib/triglav/agent/base/cli.rb +98 -0
  53. data/lib/triglav/agent/base/connection.rb +30 -0
  54. data/lib/triglav/agent/base/monitor.rb +32 -0
  55. data/lib/triglav/agent/base/processor.rb +136 -0
  56. data/lib/triglav/agent/base/setting.rb +112 -0
  57. data/lib/triglav/agent/base/worker.rb +95 -0
  58. data/lib/triglav/agent/configuration.rb +79 -0
  59. data/lib/triglav/agent/error.rb +4 -0
  60. data/lib/triglav/agent/hash_util.rb +36 -0
  61. data/lib/triglav/agent/logger.rb +50 -0
  62. data/lib/triglav/agent/storage_file.rb +144 -0
  63. data/lib/triglav/agent/timer.rb +80 -0
  64. data/lib/triglav/agent/version.rb +5 -0
  65. data/lib/triglav/agent.rb +20 -0
  66. data/lib/triglav-agent.rb +1 -0
  67. data/triglav-agent.gemspec +33 -0
  68. metadata +250 -0
@@ -0,0 +1,1081 @@
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: Triglav::Agent::Base::Setting
8
+
9
+ &mdash; Documentation by YARD 0.9.5
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 = "Triglav::Agent::Base::Setting";
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"></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 (S)</a> &raquo;
40
+ <span class='title'><span class='object_link'><a href="../../../Triglav.html" title="Triglav (module)">Triglav</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../../Agent.html" title="Triglav::Agent (module)">Agent</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../Base.html" title="Triglav::Agent::Base (module)">Base</a></span></span>
41
+ &raquo;
42
+ <span class="title">Setting</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
+ <iframe id="search_frame" src="../../../class_list.html"></iframe>
63
+
64
+ <div id="content"><h1>Class: Triglav::Agent::Base::Setting
65
+
66
+
67
+
68
+ </h1>
69
+ <div class="box_info">
70
+
71
+ <dl>
72
+ <dt>Inherits:</dt>
73
+ <dd>
74
+ <span class="inheritName">Object</span>
75
+
76
+ <ul class="fullTree">
77
+ <li>Object</li>
78
+
79
+ <li class="next">Triglav::Agent::Base::Setting</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/triglav/agent/base/setting.rb</dd>
100
+ </dl>
101
+
102
+ </div>
103
+
104
+ <h2>Overview</h2><div class="docstring">
105
+ <div class="discussion">
106
+
107
+ <p>A base class represents settings coming from config.yml and cli options</p>
108
+
109
+ <p>This base class usually should be enough for agent plugins, but you can
110
+ override this class and configure with Configuration#setting_class=</p>
111
+
112
+
113
+ </div>
114
+ </div>
115
+ <div class="tags">
116
+
117
+
118
+ </div>
119
+ <h2>Constant Summary</h2>
120
+ <dl class="constants">
121
+
122
+ <dt id="DEFAULT_LOG-constant" class="">DEFAULT_LOG =
123
+
124
+ </dt>
125
+ <dd><pre class="code"><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>STDOUT</span><span class='tstring_end'>&#39;</span></span><span class='period'>.</span><span class='id identifier rubyid_freeze'>freeze</span></pre></dd>
126
+
127
+ <dt id="DEFAULT_LOG_LEVEL-constant" class="">DEFAULT_LOG_LEVEL =
128
+
129
+ </dt>
130
+ <dd><pre class="code"><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>info</span><span class='tstring_end'>&#39;</span></span><span class='period'>.</span><span class='id identifier rubyid_freeze'>freeze</span></pre></dd>
131
+
132
+ <dt id="DEFAULT_APP_ENV-constant" class="">DEFAULT_APP_ENV =
133
+
134
+ </dt>
135
+ <dd><pre class="code"><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>development</span><span class='tstring_end'>&#39;</span></span><span class='period'>.</span><span class='id identifier rubyid_freeze'>freeze</span></pre></dd>
136
+
137
+ </dl>
138
+
139
+
140
+
141
+
142
+ <h2>Instance Attribute Summary <small><a href="#" class="summary_toggle">collapse</a></small></h2>
143
+ <ul class="summary">
144
+
145
+ <li class="public ">
146
+ <span class="summary_signature">
147
+
148
+ <a href="#cli_options-instance_method" title="#cli_options (instance method)">#<strong>cli_options</strong> &#x21d2; Object </a>
149
+
150
+
151
+
152
+ </span>
153
+
154
+
155
+
156
+
157
+ <span class="note title readonly">readonly</span>
158
+
159
+
160
+
161
+
162
+
163
+
164
+
165
+
166
+
167
+ <span class="summary_desc"><div class='inline'>
168
+ <p>Returns the value of attribute cli_options.</p>
169
+ </div></span>
170
+
171
+ </li>
172
+
173
+
174
+ </ul>
175
+
176
+
177
+
178
+
179
+
180
+ <h2>
181
+ Instance Method Summary
182
+ <small><a href="#" class="summary_toggle">collapse</a></small>
183
+ </h2>
184
+
185
+ <ul class="summary">
186
+
187
+ <li class="public ">
188
+ <span class="summary_signature">
189
+
190
+ <a href="#%5B%5D-instance_method" title="#[] (instance method)">#<strong>[]</strong>(key) &#x21d2; Object </a>
191
+
192
+
193
+
194
+ </span>
195
+
196
+
197
+
198
+
199
+
200
+
201
+
202
+
203
+
204
+ <span class="summary_desc"><div class='inline'></div></span>
205
+
206
+ </li>
207
+
208
+
209
+ <li class="public ">
210
+ <span class="summary_signature">
211
+
212
+ <a href="#app_env-instance_method" title="#app_env (instance method)">#<strong>app_env</strong> &#x21d2; Object </a>
213
+
214
+
215
+
216
+ </span>
217
+
218
+
219
+
220
+
221
+
222
+
223
+
224
+
225
+
226
+ <span class="summary_desc"><div class='inline'></div></span>
227
+
228
+ </li>
229
+
230
+
231
+ <li class="public ">
232
+ <span class="summary_signature">
233
+
234
+ <a href="#config_file-instance_method" title="#config_file (instance method)">#<strong>config_file</strong> &#x21d2; Object </a>
235
+
236
+
237
+
238
+ </span>
239
+
240
+
241
+
242
+
243
+
244
+
245
+
246
+
247
+
248
+ <span class="summary_desc"><div class='inline'></div></span>
249
+
250
+ </li>
251
+
252
+
253
+ <li class="public ">
254
+ <span class="summary_signature">
255
+
256
+ <a href="#debug%3F-instance_method" title="#debug? (instance method)">#<strong>debug?</strong> &#x21d2; Boolean </a>
257
+
258
+
259
+
260
+ </span>
261
+
262
+
263
+
264
+
265
+
266
+
267
+
268
+
269
+
270
+ <span class="summary_desc"><div class='inline'></div></span>
271
+
272
+ </li>
273
+
274
+
275
+ <li class="public ">
276
+ <span class="summary_signature">
277
+
278
+ <a href="#dig-instance_method" title="#dig (instance method)">#<strong>dig</strong>(*args) &#x21d2; Object </a>
279
+
280
+
281
+
282
+ </span>
283
+
284
+
285
+
286
+
287
+
288
+
289
+
290
+
291
+
292
+ <span class="summary_desc"><div class='inline'></div></span>
293
+
294
+ </li>
295
+
296
+
297
+ <li class="public ">
298
+ <span class="summary_signature">
299
+
300
+ <a href="#dotenv%3F-instance_method" title="#dotenv? (instance method)">#<strong>dotenv?</strong> &#x21d2; Boolean </a>
301
+
302
+
303
+
304
+ </span>
305
+
306
+
307
+
308
+
309
+
310
+
311
+
312
+
313
+
314
+ <span class="summary_desc"><div class='inline'></div></span>
315
+
316
+ </li>
317
+
318
+
319
+ <li class="public ">
320
+ <span class="summary_signature">
321
+
322
+ <a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(cli_options = {}) &#x21d2; Setting </a>
323
+
324
+
325
+
326
+ </span>
327
+
328
+
329
+ <span class="note title constructor">constructor</span>
330
+
331
+
332
+
333
+
334
+
335
+
336
+
337
+
338
+ <span class="summary_desc"><div class='inline'>
339
+ <p>A new instance of Setting.</p>
340
+ </div></span>
341
+
342
+ </li>
343
+
344
+
345
+ <li class="public ">
346
+ <span class="summary_signature">
347
+
348
+ <a href="#log-instance_method" title="#log (instance method)">#<strong>log</strong> &#x21d2; Object </a>
349
+
350
+
351
+
352
+ </span>
353
+
354
+
355
+
356
+
357
+
358
+
359
+
360
+
361
+
362
+ <span class="summary_desc"><div class='inline'></div></span>
363
+
364
+ </li>
365
+
366
+
367
+ <li class="public ">
368
+ <span class="summary_signature">
369
+
370
+ <a href="#log_level-instance_method" title="#log_level (instance method)">#<strong>log_level</strong> &#x21d2; Object </a>
371
+
372
+
373
+
374
+ </span>
375
+
376
+
377
+
378
+
379
+
380
+
381
+
382
+
383
+
384
+ <span class="summary_desc"><div class='inline'></div></span>
385
+
386
+ </li>
387
+
388
+
389
+ <li class="public ">
390
+ <span class="summary_signature">
391
+
392
+ <a href="#logger-instance_method" title="#logger (instance method)">#<strong>logger</strong> &#x21d2; Object </a>
393
+
394
+
395
+
396
+ </span>
397
+
398
+
399
+
400
+
401
+
402
+
403
+
404
+
405
+
406
+ <span class="summary_desc"><div class='inline'></div></span>
407
+
408
+ </li>
409
+
410
+
411
+ <li class="public ">
412
+ <span class="summary_signature">
413
+
414
+ <a href="#reload-instance_method" title="#reload (instance method)">#<strong>reload</strong> &#x21d2; Object </a>
415
+
416
+
417
+
418
+ </span>
419
+
420
+
421
+
422
+
423
+
424
+
425
+
426
+
427
+
428
+ <span class="summary_desc"><div class='inline'></div></span>
429
+
430
+ </li>
431
+
432
+
433
+ <li class="public ">
434
+ <span class="summary_signature">
435
+
436
+ <a href="#serverengine_options-instance_method" title="#serverengine_options (instance method)">#<strong>serverengine_options</strong> &#x21d2; Object </a>
437
+
438
+
439
+
440
+ </span>
441
+
442
+
443
+
444
+
445
+
446
+
447
+
448
+
449
+
450
+ <span class="summary_desc"><div class='inline'></div></span>
451
+
452
+ </li>
453
+
454
+
455
+ <li class="public ">
456
+ <span class="summary_signature">
457
+
458
+ <a href="#status_file-instance_method" title="#status_file (instance method)">#<strong>status_file</strong> &#x21d2; Object </a>
459
+
460
+
461
+
462
+ </span>
463
+
464
+
465
+
466
+
467
+
468
+
469
+
470
+
471
+
472
+ <span class="summary_desc"><div class='inline'></div></span>
473
+
474
+ </li>
475
+
476
+
477
+ <li class="public ">
478
+ <span class="summary_signature">
479
+
480
+ <a href="#token_file-instance_method" title="#token_file (instance method)">#<strong>token_file</strong> &#x21d2; Object </a>
481
+
482
+
483
+
484
+ </span>
485
+
486
+
487
+
488
+
489
+
490
+
491
+
492
+
493
+
494
+ <span class="summary_desc"><div class='inline'></div></span>
495
+
496
+ </li>
497
+
498
+
499
+ </ul>
500
+
501
+
502
+ <div id="constructor_details" class="method_details_list">
503
+ <h2>Constructor Details</h2>
504
+
505
+ <div class="method_details first">
506
+ <h3 class="signature first" id="initialize-instance_method">
507
+
508
+ #<strong>initialize</strong>(cli_options = {}) &#x21d2; <tt><span class='object_link'><a href="" title="Triglav::Agent::Base::Setting (class)">Setting</a></span></tt>
509
+
510
+
511
+
512
+
513
+
514
+ </h3><div class="docstring">
515
+ <div class="discussion">
516
+
517
+ <p>Returns a new instance of Setting</p>
518
+
519
+
520
+ </div>
521
+ </div>
522
+ <div class="tags">
523
+
524
+
525
+ </div><table class="source_code">
526
+ <tr>
527
+ <td>
528
+ <pre class="lines">
529
+
530
+
531
+ 19
532
+ 20
533
+ 21
534
+ 22
535
+ 23
536
+ 24
537
+ 25</pre>
538
+ </td>
539
+ <td>
540
+ <pre class="code"><span class="info file"># File 'lib/triglav/agent/base/setting.rb', line 19</span>
541
+
542
+ <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_cli_options'>cli_options</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
543
+ <span class='ivar'>@cli_options</span> <span class='op'>=</span> <span class='id identifier rubyid_cli_options'>cli_options</span>
544
+ <span class='kw'>if</span> <span class='id identifier rubyid_dotenv?'>dotenv?</span>
545
+ <span class='id identifier rubyid_require'>require</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>dotenv</span><span class='tstring_end'>&#39;</span></span>
546
+ <span class='const'>Dotenv</span><span class='period'>.</span><span class='id identifier rubyid_load'>load</span>
547
+ <span class='kw'>end</span>
548
+ <span class='kw'>end</span></pre>
549
+ </td>
550
+ </tr>
551
+ </table>
552
+ </div>
553
+
554
+ </div>
555
+
556
+ <div id="instance_attr_details" class="attr_details">
557
+ <h2>Instance Attribute Details</h2>
558
+
559
+
560
+ <span id=""></span>
561
+ <div class="method_details first">
562
+ <h3 class="signature first" id="cli_options-instance_method">
563
+
564
+ #<strong>cli_options</strong> &#x21d2; <tt>Object</tt> <span class="extras">(readonly)</span>
565
+
566
+
567
+
568
+
569
+
570
+ </h3><div class="docstring">
571
+ <div class="discussion">
572
+
573
+ <p>Returns the value of attribute cli_options</p>
574
+
575
+
576
+ </div>
577
+ </div>
578
+ <div class="tags">
579
+
580
+
581
+ </div><table class="source_code">
582
+ <tr>
583
+ <td>
584
+ <pre class="lines">
585
+
586
+
587
+ 13
588
+ 14
589
+ 15</pre>
590
+ </td>
591
+ <td>
592
+ <pre class="code"><span class="info file"># File 'lib/triglav/agent/base/setting.rb', line 13</span>
593
+
594
+ <span class='kw'>def</span> <span class='id identifier rubyid_cli_options'>cli_options</span>
595
+ <span class='ivar'>@cli_options</span>
596
+ <span class='kw'>end</span></pre>
597
+ </td>
598
+ </tr>
599
+ </table>
600
+ </div>
601
+
602
+ </div>
603
+
604
+
605
+ <div id="instance_method_details" class="method_details_list">
606
+ <h2>Instance Method Details</h2>
607
+
608
+
609
+ <div class="method_details first">
610
+ <h3 class="signature first" id="[]-instance_method">
611
+
612
+ #<strong>[]</strong>(key) &#x21d2; <tt>Object</tt>
613
+
614
+
615
+
616
+
617
+
618
+ </h3><table class="source_code">
619
+ <tr>
620
+ <td>
621
+ <pre class="lines">
622
+
623
+
624
+ 84
625
+ 85
626
+ 86</pre>
627
+ </td>
628
+ <td>
629
+ <pre class="code"><span class="info file"># File 'lib/triglav/agent/base/setting.rb', line 84</span>
630
+
631
+ <span class='kw'>def</span> <span class='op'>[]</span><span class='lparen'>(</span><span class='id identifier rubyid_key'>key</span><span class='rparen'>)</span>
632
+ <span class='id identifier rubyid_config'>config</span><span class='lbracket'>[</span><span class='id identifier rubyid_key'>key</span><span class='rbracket'>]</span>
633
+ <span class='kw'>end</span></pre>
634
+ </td>
635
+ </tr>
636
+ </table>
637
+ </div>
638
+
639
+ <div class="method_details ">
640
+ <h3 class="signature " id="app_env-instance_method">
641
+
642
+ #<strong>app_env</strong> &#x21d2; <tt>Object</tt>
643
+
644
+
645
+
646
+
647
+
648
+ </h3><table class="source_code">
649
+ <tr>
650
+ <td>
651
+ <pre class="lines">
652
+
653
+
654
+ 34
655
+ 35
656
+ 36</pre>
657
+ </td>
658
+ <td>
659
+ <pre class="code"><span class="info file"># File 'lib/triglav/agent/base/setting.rb', line 34</span>
660
+
661
+ <span class='kw'>def</span> <span class='id identifier rubyid_app_env'>app_env</span>
662
+ <span class='ivar'>@app_env</span> <span class='op'>||=</span> <span class='const'>ENV</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>APP_ENV</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='const'>DEFAULT_APP_ENV</span>
663
+ <span class='kw'>end</span></pre>
664
+ </td>
665
+ </tr>
666
+ </table>
667
+ </div>
668
+
669
+ <div class="method_details ">
670
+ <h3 class="signature " id="config_file-instance_method">
671
+
672
+ #<strong>config_file</strong> &#x21d2; <tt>Object</tt>
673
+
674
+
675
+
676
+
677
+
678
+ </h3><table class="source_code">
679
+ <tr>
680
+ <td>
681
+ <pre class="lines">
682
+
683
+
684
+ 38
685
+ 39
686
+ 40</pre>
687
+ </td>
688
+ <td>
689
+ <pre class="code"><span class="info file"># File 'lib/triglav/agent/base/setting.rb', line 38</span>
690
+
691
+ <span class='kw'>def</span> <span class='id identifier rubyid_config_file'>config_file</span>
692
+ <span class='ivar'>@cli_options</span><span class='lbracket'>[</span><span class='symbol'>:config</span><span class='rbracket'>]</span>
693
+ <span class='kw'>end</span></pre>
694
+ </td>
695
+ </tr>
696
+ </table>
697
+ </div>
698
+
699
+ <div class="method_details ">
700
+ <h3 class="signature " id="debug?-instance_method">
701
+
702
+ #<strong>debug?</strong> &#x21d2; <tt>Boolean</tt>
703
+
704
+
705
+
706
+
707
+
708
+ </h3><div class="docstring">
709
+ <div class="discussion">
710
+
711
+
712
+ </div>
713
+ </div>
714
+ <div class="tags">
715
+
716
+ <p class="tag_title">Returns:</p>
717
+ <ul class="return">
718
+
719
+ <li>
720
+
721
+
722
+ <span class='type'>(<tt>Boolean</tt>)</span>
723
+
724
+
725
+
726
+ </li>
727
+
728
+ </ul>
729
+
730
+ </div><table class="source_code">
731
+ <tr>
732
+ <td>
733
+ <pre class="lines">
734
+
735
+
736
+ 54
737
+ 55
738
+ 56</pre>
739
+ </td>
740
+ <td>
741
+ <pre class="code"><span class="info file"># File 'lib/triglav/agent/base/setting.rb', line 54</span>
742
+
743
+ <span class='kw'>def</span> <span class='id identifier rubyid_debug?'>debug?</span>
744
+ <span class='ivar'>@cli_options</span><span class='lbracket'>[</span><span class='symbol'>:debug</span><span class='rbracket'>]</span>
745
+ <span class='kw'>end</span></pre>
746
+ </td>
747
+ </tr>
748
+ </table>
749
+ </div>
750
+
751
+ <div class="method_details ">
752
+ <h3 class="signature " id="dig-instance_method">
753
+
754
+ #<strong>dig</strong>(*args) &#x21d2; <tt>Object</tt>
755
+
756
+
757
+
758
+
759
+
760
+ </h3><table class="source_code">
761
+ <tr>
762
+ <td>
763
+ <pre class="lines">
764
+
765
+
766
+ 88
767
+ 89
768
+ 90</pre>
769
+ </td>
770
+ <td>
771
+ <pre class="code"><span class="info file"># File 'lib/triglav/agent/base/setting.rb', line 88</span>
772
+
773
+ <span class='kw'>def</span> <span class='id identifier rubyid_dig'>dig</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span>
774
+ <span class='id identifier rubyid_config'>config</span><span class='period'>.</span><span class='id identifier rubyid_dig'>dig</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span>
775
+ <span class='kw'>end</span></pre>
776
+ </td>
777
+ </tr>
778
+ </table>
779
+ </div>
780
+
781
+ <div class="method_details ">
782
+ <h3 class="signature " id="dotenv?-instance_method">
783
+
784
+ #<strong>dotenv?</strong> &#x21d2; <tt>Boolean</tt>
785
+
786
+
787
+
788
+
789
+
790
+ </h3><div class="docstring">
791
+ <div class="discussion">
792
+
793
+
794
+ </div>
795
+ </div>
796
+ <div class="tags">
797
+
798
+ <p class="tag_title">Returns:</p>
799
+ <ul class="return">
800
+
801
+ <li>
802
+
803
+
804
+ <span class='type'>(<tt>Boolean</tt>)</span>
805
+
806
+
807
+
808
+ </li>
809
+
810
+ </ul>
811
+
812
+ </div><table class="source_code">
813
+ <tr>
814
+ <td>
815
+ <pre class="lines">
816
+
817
+
818
+ 50
819
+ 51
820
+ 52</pre>
821
+ </td>
822
+ <td>
823
+ <pre class="code"><span class="info file"># File 'lib/triglav/agent/base/setting.rb', line 50</span>
824
+
825
+ <span class='kw'>def</span> <span class='id identifier rubyid_dotenv?'>dotenv?</span>
826
+ <span class='ivar'>@cli_options</span><span class='lbracket'>[</span><span class='symbol'>:dotenv</span><span class='rbracket'>]</span>
827
+ <span class='kw'>end</span></pre>
828
+ </td>
829
+ </tr>
830
+ </table>
831
+ </div>
832
+
833
+ <div class="method_details ">
834
+ <h3 class="signature " id="log-instance_method">
835
+
836
+ #<strong>log</strong> &#x21d2; <tt>Object</tt>
837
+
838
+
839
+
840
+
841
+
842
+ </h3><table class="source_code">
843
+ <tr>
844
+ <td>
845
+ <pre class="lines">
846
+
847
+
848
+ 66
849
+ 67
850
+ 68</pre>
851
+ </td>
852
+ <td>
853
+ <pre class="code"><span class="info file"># File 'lib/triglav/agent/base/setting.rb', line 66</span>
854
+
855
+ <span class='kw'>def</span> <span class='id identifier rubyid_log'>log</span>
856
+ <span class='ivar'>@cli_options</span><span class='lbracket'>[</span><span class='symbol'>:log</span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='id identifier rubyid_config'>config</span><span class='period'>.</span><span class='id identifier rubyid_dig'>dig</span><span class='lparen'>(</span><span class='symbol'>:serverengine</span><span class='comma'>,</span> <span class='symbol'>:log</span><span class='rparen'>)</span> <span class='op'>||</span> <span class='const'>DEFAULT_LOG</span>
857
+ <span class='kw'>end</span></pre>
858
+ </td>
859
+ </tr>
860
+ </table>
861
+ </div>
862
+
863
+ <div class="method_details ">
864
+ <h3 class="signature " id="log_level-instance_method">
865
+
866
+ #<strong>log_level</strong> &#x21d2; <tt>Object</tt>
867
+
868
+
869
+
870
+
871
+
872
+ </h3><table class="source_code">
873
+ <tr>
874
+ <td>
875
+ <pre class="lines">
876
+
877
+
878
+ 62
879
+ 63
880
+ 64</pre>
881
+ </td>
882
+ <td>
883
+ <pre class="code"><span class="info file"># File 'lib/triglav/agent/base/setting.rb', line 62</span>
884
+
885
+ <span class='kw'>def</span> <span class='id identifier rubyid_log_level'>log_level</span>
886
+ <span class='ivar'>@cli_options</span><span class='lbracket'>[</span><span class='symbol'>:log_level</span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='id identifier rubyid_config'>config</span><span class='period'>.</span><span class='id identifier rubyid_dig'>dig</span><span class='lparen'>(</span><span class='symbol'>:serverengine</span><span class='comma'>,</span> <span class='symbol'>:log_level</span><span class='rparen'>)</span> <span class='op'>||</span> <span class='const'>DEFAULT_LOG_LEVEL</span>
887
+ <span class='kw'>end</span></pre>
888
+ </td>
889
+ </tr>
890
+ </table>
891
+ </div>
892
+
893
+ <div class="method_details ">
894
+ <h3 class="signature " id="logger-instance_method">
895
+
896
+ #<strong>logger</strong> &#x21d2; <tt>Object</tt>
897
+
898
+
899
+
900
+
901
+
902
+ </h3><table class="source_code">
903
+ <tr>
904
+ <td>
905
+ <pre class="lines">
906
+
907
+
908
+ 58
909
+ 59
910
+ 60</pre>
911
+ </td>
912
+ <td>
913
+ <pre class="code"><span class="info file"># File 'lib/triglav/agent/base/setting.rb', line 58</span>
914
+
915
+ <span class='kw'>def</span> <span class='id identifier rubyid_logger'>logger</span>
916
+ <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='id identifier rubyid_log'>log</span><span class='comma'>,</span> <span class='id identifier rubyid_serverengine_logger_options'>serverengine_logger_options</span><span class='rparen'>)</span>
917
+ <span class='kw'>end</span></pre>
918
+ </td>
919
+ </tr>
920
+ </table>
921
+ </div>
922
+
923
+ <div class="method_details ">
924
+ <h3 class="signature " id="reload-instance_method">
925
+
926
+ #<strong>reload</strong> &#x21d2; <tt>Object</tt>
927
+
928
+
929
+
930
+
931
+
932
+ </h3><table class="source_code">
933
+ <tr>
934
+ <td>
935
+ <pre class="lines">
936
+
937
+
938
+ 27
939
+ 28
940
+ 29
941
+ 30
942
+ 31
943
+ 32</pre>
944
+ </td>
945
+ <td>
946
+ <pre class="code"><span class="info file"># File 'lib/triglav/agent/base/setting.rb', line 27</span>
947
+
948
+ <span class='kw'>def</span> <span class='id identifier rubyid_reload'>reload</span>
949
+ <span class='const'>Dotenv</span><span class='period'>.</span><span class='id identifier rubyid_overload'>overload</span> <span class='kw'>if</span> <span class='id identifier rubyid_dotenv?'>dotenv?</span>
950
+ <span class='ivar'>@config</span> <span class='op'>=</span> <span class='kw'>nil</span>
951
+ <span class='ivar'>@logger</span><span class='period'>.</span><span class='id identifier rubyid_close'>close</span> <span class='kw'>rescue</span> <span class='kw'>nil</span>
952
+ <span class='ivar'>@logger</span> <span class='op'>=</span> <span class='kw'>nil</span>
953
+ <span class='kw'>end</span></pre>
954
+ </td>
955
+ </tr>
956
+ </table>
957
+ </div>
958
+
959
+ <div class="method_details ">
960
+ <h3 class="signature " id="serverengine_options-instance_method">
961
+
962
+ #<strong>serverengine_options</strong> &#x21d2; <tt>Object</tt>
963
+
964
+
965
+
966
+
967
+
968
+ </h3><table class="source_code">
969
+ <tr>
970
+ <td>
971
+ <pre class="lines">
972
+
973
+
974
+ 70
975
+ 71
976
+ 72
977
+ 73
978
+ 74
979
+ 75
980
+ 76
981
+ 77
982
+ 78
983
+ 79
984
+ 80
985
+ 81
986
+ 82</pre>
987
+ </td>
988
+ <td>
989
+ <pre class="code"><span class="info file"># File 'lib/triglav/agent/base/setting.rb', line 70</span>
990
+
991
+ <span class='kw'>def</span> <span class='id identifier rubyid_serverengine_options'>serverengine_options</span>
992
+ <span class='id identifier rubyid_serverengine_options'>serverengine_options</span> <span class='op'>=</span> <span class='id identifier rubyid_config'>config</span><span class='lbracket'>[</span><span class='symbol'>:serverengine</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_dup'>dup</span> <span class='op'>||</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
993
+ <span class='comment'># serverengine_options[:workers] = 1 # default
994
+ </span> <span class='comment'># serverengine_options[:worker_type] = &#39;embedded&#39; # default
995
+ </span> <span class='id identifier rubyid_serverengine_options'>serverengine_options</span><span class='period'>.</span><span class='id identifier rubyid_keys'>keys</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_k'>k</span><span class='op'>|</span>
996
+ <span class='id identifier rubyid_serverengine_options'>serverengine_options</span><span class='period'>.</span><span class='id identifier rubyid_delete'>delete</span><span class='lparen'>(</span><span class='id identifier rubyid_k'>k</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='id identifier rubyid_k'>k</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='period'>.</span><span class='id identifier rubyid_start_with?'>start_with?</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>log</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span>
997
+ <span class='kw'>end</span>
998
+ <span class='id identifier rubyid_serverengine_options'>serverengine_options</span><span class='period'>.</span><span class='id identifier rubyid_merge!'>merge!</span><span class='lparen'>(</span><span class='lbrace'>{</span>
999
+ <span class='label'>logger:</span> <span class='id identifier rubyid_logger'>logger</span><span class='comma'>,</span>
1000
+ <span class='label'>log_level:</span> <span class='id identifier rubyid_log_level'>log_level</span><span class='comma'>,</span>
1001
+ <span class='label'>setting:</span> <span class='kw'>self</span><span class='comma'>,</span>
1002
+ <span class='rbrace'>}</span><span class='rparen'>)</span>
1003
+ <span class='kw'>end</span></pre>
1004
+ </td>
1005
+ </tr>
1006
+ </table>
1007
+ </div>
1008
+
1009
+ <div class="method_details ">
1010
+ <h3 class="signature " id="status_file-instance_method">
1011
+
1012
+ #<strong>status_file</strong> &#x21d2; <tt>Object</tt>
1013
+
1014
+
1015
+
1016
+
1017
+
1018
+ </h3><table class="source_code">
1019
+ <tr>
1020
+ <td>
1021
+ <pre class="lines">
1022
+
1023
+
1024
+ 42
1025
+ 43
1026
+ 44</pre>
1027
+ </td>
1028
+ <td>
1029
+ <pre class="code"><span class="info file"># File 'lib/triglav/agent/base/setting.rb', line 42</span>
1030
+
1031
+ <span class='kw'>def</span> <span class='id identifier rubyid_status_file'>status_file</span>
1032
+ <span class='ivar'>@status_file</span> <span class='op'>||=</span> <span class='ivar'>@cli_options</span><span class='lbracket'>[</span><span class='symbol'>:status</span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='id identifier rubyid_config'>config</span><span class='period'>.</span><span class='id identifier rubyid_dig'>dig</span><span class='lparen'>(</span><span class='symbol'>:triglav</span><span class='comma'>,</span> <span class='symbol'>:status_file</span><span class='rparen'>)</span> <span class='op'>||</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>status.yml</span><span class='tstring_end'>&#39;</span></span>
1033
+ <span class='kw'>end</span></pre>
1034
+ </td>
1035
+ </tr>
1036
+ </table>
1037
+ </div>
1038
+
1039
+ <div class="method_details ">
1040
+ <h3 class="signature " id="token_file-instance_method">
1041
+
1042
+ #<strong>token_file</strong> &#x21d2; <tt>Object</tt>
1043
+
1044
+
1045
+
1046
+
1047
+
1048
+ </h3><table class="source_code">
1049
+ <tr>
1050
+ <td>
1051
+ <pre class="lines">
1052
+
1053
+
1054
+ 46
1055
+ 47
1056
+ 48</pre>
1057
+ </td>
1058
+ <td>
1059
+ <pre class="code"><span class="info file"># File 'lib/triglav/agent/base/setting.rb', line 46</span>
1060
+
1061
+ <span class='kw'>def</span> <span class='id identifier rubyid_token_file'>token_file</span>
1062
+ <span class='ivar'>@token_file</span> <span class='op'>||=</span> <span class='ivar'>@cli_options</span><span class='lbracket'>[</span><span class='symbol'>:token</span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='id identifier rubyid_config'>config</span><span class='period'>.</span><span class='id identifier rubyid_dig'>dig</span><span class='lparen'>(</span><span class='symbol'>:triglav</span><span class='comma'>,</span> <span class='symbol'>:token_file</span><span class='rparen'>)</span> <span class='op'>||</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>token.yml</span><span class='tstring_end'>&#39;</span></span>
1063
+ <span class='kw'>end</span></pre>
1064
+ </td>
1065
+ </tr>
1066
+ </table>
1067
+ </div>
1068
+
1069
+ </div>
1070
+
1071
+ </div>
1072
+
1073
+ <div id="footer">
1074
+ Generated on Thu Feb 23 23:20:33 2017 by
1075
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
1076
+ 0.9.5 (ruby-2.3.2).
1077
+ </div>
1078
+
1079
+ </div>
1080
+ </body>
1081
+ </html>