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,271 @@
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::LogFormatter
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::LogFormatter";
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 (L)</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>
41
+ &raquo;
42
+ <span class="title">LogFormatter</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::LogFormatter
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::LogFormatter</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/logger.rb</dd>
100
+ </dl>
101
+
102
+ </div>
103
+
104
+
105
+ <h2>Constant Summary</h2>
106
+ <dl class="constants">
107
+
108
+ <dt id="FORMAT-constant" class="">FORMAT =
109
+
110
+ </dt>
111
+ <dd><pre class="code"><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>%s [%s] %s %s\n</span><span class='tstring_end'>&quot;</span></span></pre></dd>
112
+
113
+ </dl>
114
+
115
+
116
+
117
+
118
+
119
+
120
+
121
+
122
+ <h2>
123
+ Instance Method Summary
124
+ <small><a href="#" class="summary_toggle">collapse</a></small>
125
+ </h2>
126
+
127
+ <ul class="summary">
128
+
129
+ <li class="public ">
130
+ <span class="summary_signature">
131
+
132
+ <a href="#call-instance_method" title="#call (instance method)">#<strong>call</strong>(severity, time, progname, msg) &#x21d2; Object </a>
133
+
134
+
135
+
136
+ </span>
137
+
138
+
139
+
140
+
141
+
142
+
143
+
144
+
145
+
146
+ <span class="summary_desc"><div class='inline'></div></span>
147
+
148
+ </li>
149
+
150
+
151
+ <li class="public ">
152
+ <span class="summary_signature">
153
+
154
+ <a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(opts = {}) &#x21d2; LogFormatter </a>
155
+
156
+
157
+
158
+ </span>
159
+
160
+
161
+ <span class="note title constructor">constructor</span>
162
+
163
+
164
+
165
+
166
+
167
+
168
+
169
+
170
+ <span class="summary_desc"><div class='inline'>
171
+ <p>A new instance of LogFormatter.</p>
172
+ </div></span>
173
+
174
+ </li>
175
+
176
+
177
+ </ul>
178
+
179
+
180
+ <div id="constructor_details" class="method_details_list">
181
+ <h2>Constructor Details</h2>
182
+
183
+ <div class="method_details first">
184
+ <h3 class="signature first" id="initialize-instance_method">
185
+
186
+ #<strong>initialize</strong>(opts = {}) &#x21d2; <tt><span class='object_link'><a href="" title="Triglav::Agent::LogFormatter (class)">LogFormatter</a></span></tt>
187
+
188
+
189
+
190
+
191
+
192
+ </h3><div class="docstring">
193
+ <div class="discussion">
194
+
195
+ <p>Returns a new instance of LogFormatter</p>
196
+
197
+
198
+ </div>
199
+ </div>
200
+ <div class="tags">
201
+
202
+
203
+ </div><table class="source_code">
204
+ <tr>
205
+ <td>
206
+ <pre class="lines">
207
+
208
+
209
+ 24
210
+ 25</pre>
211
+ </td>
212
+ <td>
213
+ <pre class="code"><span class="info file"># File 'lib/triglav/agent/logger.rb', line 24</span>
214
+
215
+ <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_opts'>opts</span><span class='op'>=</span><span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
216
+ <span class='kw'>end</span></pre>
217
+ </td>
218
+ </tr>
219
+ </table>
220
+ </div>
221
+
222
+ </div>
223
+
224
+
225
+ <div id="instance_method_details" class="method_details_list">
226
+ <h2>Instance Method Details</h2>
227
+
228
+
229
+ <div class="method_details first">
230
+ <h3 class="signature first" id="call-instance_method">
231
+
232
+ #<strong>call</strong>(severity, time, progname, msg) &#x21d2; <tt>Object</tt>
233
+
234
+
235
+
236
+
237
+
238
+ </h3><table class="source_code">
239
+ <tr>
240
+ <td>
241
+ <pre class="lines">
242
+
243
+
244
+ 27
245
+ 28
246
+ 29</pre>
247
+ </td>
248
+ <td>
249
+ <pre class="code"><span class="info file"># File 'lib/triglav/agent/logger.rb', line 27</span>
250
+
251
+ <span class='kw'>def</span> <span class='id identifier rubyid_call'>call</span><span class='lparen'>(</span><span class='id identifier rubyid_severity'>severity</span><span class='comma'>,</span> <span class='id identifier rubyid_time'>time</span><span class='comma'>,</span> <span class='id identifier rubyid_progname'>progname</span><span class='comma'>,</span> <span class='id identifier rubyid_msg'>msg</span><span class='rparen'>)</span>
252
+ <span class='const'>FORMAT</span> <span class='op'>%</span> <span class='lbracket'>[</span><span class='id identifier rubyid_format_datetime'>format_datetime</span><span class='lparen'>(</span><span class='id identifier rubyid_time'>time</span><span class='rparen'>)</span><span class='comma'>,</span> <span class='id identifier rubyid_severity'>severity</span><span class='comma'>,</span> <span class='id identifier rubyid_format_pid'>format_pid</span><span class='comma'>,</span> <span class='id identifier rubyid_format_message'>format_message</span><span class='lparen'>(</span><span class='id identifier rubyid_msg'>msg</span><span class='rparen'>)</span><span class='rbracket'>]</span>
253
+ <span class='kw'>end</span></pre>
254
+ </td>
255
+ </tr>
256
+ </table>
257
+ </div>
258
+
259
+ </div>
260
+
261
+ </div>
262
+
263
+ <div id="footer">
264
+ Generated on Thu Feb 23 23:20:33 2017 by
265
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
266
+ 0.9.5 (ruby-2.3.2).
267
+ </div>
268
+
269
+ </div>
270
+ </body>
271
+ </html>
@@ -0,0 +1,287 @@
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::Logger
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::Logger";
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 (L)</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>
41
+ &raquo;
42
+ <span class="title">Logger</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::Logger
65
+
66
+
67
+
68
+ </h1>
69
+ <div class="box_info">
70
+
71
+ <dl>
72
+ <dt>Inherits:</dt>
73
+ <dd>
74
+ <span class="inheritName">ServerEngine::DaemonLogger</span>
75
+
76
+ <ul class="fullTree">
77
+ <li>Object</li>
78
+
79
+ <li class="next">ServerEngine::DaemonLogger</li>
80
+
81
+ <li class="next">Triglav::Agent::Logger</li>
82
+
83
+ </ul>
84
+ <a href="#" class="inheritanceTree">show all</a>
85
+
86
+ </dd>
87
+ </dl>
88
+
89
+
90
+
91
+
92
+
93
+
94
+
95
+
96
+
97
+
98
+
99
+ <dl>
100
+ <dt>Defined in:</dt>
101
+ <dd>lib/triglav/agent/logger.rb</dd>
102
+ </dl>
103
+
104
+ </div>
105
+
106
+ <h2>Overview</h2><div class="docstring">
107
+ <div class="discussion">
108
+
109
+ <p>Logger class</p>
110
+
111
+ <pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_require'>require</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>triglav/agent/logger</span><span class='tstring_end'>&#39;</span></span>
112
+ <span class='id identifier rubyid_logger'>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='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>STDOUT</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='id identifier rubyid_opts'>opts</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
113
+ </code></pre>
114
+
115
+
116
+ </div>
117
+ </div>
118
+ <div class="tags">
119
+
120
+
121
+ </div>
122
+
123
+
124
+
125
+
126
+
127
+
128
+
129
+ <h2>
130
+ Instance Method Summary
131
+ <small><a href="#" class="summary_toggle">collapse</a></small>
132
+ </h2>
133
+
134
+ <ul class="summary">
135
+
136
+ <li class="public ">
137
+ <span class="summary_signature">
138
+
139
+ <a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(logdev, *args) &#x21d2; Logger </a>
140
+
141
+
142
+
143
+ </span>
144
+
145
+
146
+ <span class="note title constructor">constructor</span>
147
+
148
+
149
+
150
+
151
+
152
+
153
+
154
+
155
+ <span class="summary_desc"><div class='inline'>
156
+ <p>A new instance of Logger.</p>
157
+ </div></span>
158
+
159
+ </li>
160
+
161
+
162
+ <li class="public ">
163
+ <span class="summary_signature">
164
+
165
+ <a href="#write-instance_method" title="#write (instance method)">#<strong>write</strong>(msg) &#x21d2; Object </a>
166
+
167
+
168
+
169
+ </span>
170
+
171
+
172
+
173
+
174
+
175
+
176
+
177
+
178
+
179
+ <span class="summary_desc"><div class='inline'></div></span>
180
+
181
+ </li>
182
+
183
+
184
+ </ul>
185
+
186
+
187
+
188
+ <div id="constructor_details" class="method_details_list">
189
+ <h2>Constructor Details</h2>
190
+
191
+ <div class="method_details first">
192
+ <h3 class="signature first" id="initialize-instance_method">
193
+
194
+ #<strong>initialize</strong>(logdev, *args) &#x21d2; <tt><span class='object_link'><a href="" title="Triglav::Agent::Logger (class)">Logger</a></span></tt>
195
+
196
+
197
+
198
+
199
+
200
+ </h3><div class="docstring">
201
+ <div class="discussion">
202
+
203
+ <p>Returns a new instance of Logger</p>
204
+
205
+
206
+ </div>
207
+ </div>
208
+ <div class="tags">
209
+
210
+
211
+ </div><table class="source_code">
212
+ <tr>
213
+ <td>
214
+ <pre class="lines">
215
+
216
+
217
+ 9
218
+ 10
219
+ 11
220
+ 12
221
+ 13
222
+ 14</pre>
223
+ </td>
224
+ <td>
225
+ <pre class="code"><span class="info file"># File 'lib/triglav/agent/logger.rb', line 9</span>
226
+
227
+ <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_logdev'>logdev</span><span class='comma'>,</span> <span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span>
228
+ <span class='id identifier rubyid_logdev'>logdev</span> <span class='op'>=</span> <span class='const'>STDOUT</span> <span class='kw'>if</span> <span class='id identifier rubyid_logdev'>logdev</span> <span class='op'>==</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>STDOUT</span><span class='tstring_end'>&#39;</span></span>
229
+ <span class='id identifier rubyid_logdev'>logdev</span> <span class='op'>=</span> <span class='const'>STDERR</span> <span class='kw'>if</span> <span class='id identifier rubyid_logdev'>logdev</span> <span class='op'>==</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>STDERR</span><span class='tstring_end'>&#39;</span></span>
230
+ <span class='kw'>super</span><span class='lparen'>(</span><span class='id identifier rubyid_logdev'>logdev</span><span class='comma'>,</span> <span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span>
231
+ <span class='ivar'>@formatter</span> <span class='op'>=</span> <span class='const'>LogFormatter</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
232
+ <span class='kw'>end</span></pre>
233
+ </td>
234
+ </tr>
235
+ </table>
236
+ </div>
237
+
238
+ </div>
239
+
240
+
241
+ <div id="instance_method_details" class="method_details_list">
242
+ <h2>Instance Method Details</h2>
243
+
244
+
245
+ <div class="method_details first">
246
+ <h3 class="signature first" id="write-instance_method">
247
+
248
+ #<strong>write</strong>(msg) &#x21d2; <tt>Object</tt>
249
+
250
+
251
+
252
+
253
+
254
+ </h3><table class="source_code">
255
+ <tr>
256
+ <td>
257
+ <pre class="lines">
258
+
259
+
260
+ 16
261
+ 17
262
+ 18</pre>
263
+ </td>
264
+ <td>
265
+ <pre class="code"><span class="info file"># File 'lib/triglav/agent/logger.rb', line 16</span>
266
+
267
+ <span class='kw'>def</span> <span class='id identifier rubyid_write'>write</span><span class='lparen'>(</span><span class='id identifier rubyid_msg'>msg</span><span class='rparen'>)</span>
268
+ <span class='ivar'>@logdev</span><span class='period'>.</span><span class='id identifier rubyid_write'>write</span> <span class='id identifier rubyid_msg'>msg</span>
269
+ <span class='kw'>end</span></pre>
270
+ </td>
271
+ </tr>
272
+ </table>
273
+ </div>
274
+
275
+ </div>
276
+
277
+ </div>
278
+
279
+ <div id="footer">
280
+ Generated on Thu Feb 23 23:20:33 2017 by
281
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
282
+ 0.9.5 (ruby-2.3.2).
283
+ </div>
284
+
285
+ </div>
286
+ </body>
287
+ </html>