norikra-client-jruby 0.1.4-java → 0.1.5-java

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9007dc22fe24a3b7f8f75e197a6238311121bb75
4
- data.tar.gz: b9f34005cd927c92b4006df0cd3f4670b9c9b016
3
+ metadata.gz: 54c8ac9f3560f9a9a2424e94a6f9c95315c21e64
4
+ data.tar.gz: 0b0ef3d3c3aeb68b9afb2fe6dec82e9492ad404e
5
5
  SHA512:
6
- metadata.gz: 580126928e16bf629e0294ee8b70b385449b92956552fed86eee3192bd6217939f568a36002d80f8d763cb830eb2e3a6952c5d259d401437d0699ab01a7c745a
7
- data.tar.gz: d3c42f27bdf85beeb952933b3efaeff68866822ae5aa263833afdf1786bae05e1c469591688b88afe8778c5626a35e11937d8fb30c7b88d4c6118eca1f043dc7
6
+ metadata.gz: a2490fc54acab73c0035ffeeb78753027a73d80f780dc40ff647a1a8c2502d2508ef49f2da628224ac6f33bdecf7a11d0b8276c28e6222a3d6b7ef2df7b0af24
7
+ data.tar.gz: 8be153f739468c12e9cc41a09574cb1bf4aa24f2f3096ba2cba2385a43ac57866a27293a07cbd3e7086d21c1ec861dc1fd7cfdeec382107507c0e163b14b26cb
@@ -213,6 +213,44 @@ class Norikra::Client
213
213
  end
214
214
  end
215
215
 
216
+ class Admin < Thor
217
+ include Norikra::Client::CLIUtil
218
+
219
+ desc "stats", "dump stats json: same with norikra server's --stats option"
220
+ def stats
221
+ client = client(parent_options)
222
+
223
+ targets = []
224
+ queries = []
225
+
226
+ wrap do
227
+ queries = client.queries()
228
+
229
+ client.targets().each do |t|
230
+ fields = {}
231
+ client.fields(t['name']).each do |f|
232
+ next if f['type'] == 'hash' || f['type'] == 'array'
233
+ fields[f['name']] = f
234
+ end
235
+ targets.push( { "name" => t['name'], "fields" => fields, "auto_field" => t['auto_field'] } )
236
+ end
237
+ end
238
+
239
+ require 'json'
240
+
241
+ puts JSON.pretty_generate({
242
+ "threads" => {
243
+ "engine" => { "inbound" => {}, "outbound" => {}, "route_exec" => {}, "timer_exec" => {} },
244
+ "rpc" => {},
245
+ "web" => {},
246
+ },
247
+ "log" => {},
248
+ "targets" => targets,
249
+ "queries" => queries,
250
+ })
251
+ end
252
+ end
253
+
216
254
  class CLI < Thor
217
255
  include Norikra::Client::CLIUtil
218
256
 
@@ -230,5 +268,8 @@ class Norikra::Client
230
268
 
231
269
  desc "event CMD ...ARGS", "send/fetch events"
232
270
  subcommand "event", Event
271
+
272
+ desc "admin CMD ...ARGS", "norikra server administrations"
273
+ subcommand "admin", Admin
233
274
  end
234
275
  end
@@ -1,5 +1,5 @@
1
1
  module Norikra
2
2
  class Client
3
- VERSION = "0.1.4"
3
+ VERSION = "0.1.5"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: norikra-client-jruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: java
6
6
  authors:
7
7
  - TAGOMORI Satoshi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-03-07 00:00:00.000000000 Z
11
+ date: 2014-03-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: msgpack-rpc-over-http-jruby