hystrix_metrics 0.0.1-java → 0.2.0-java

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 3c1ba4c02682c52b6e8c41417d056474ac0b9af6
4
- data.tar.gz: '09b4261b1c9214cf392971476374f502c22e1d0c'
2
+ SHA256:
3
+ metadata.gz: b2ffa7dd41f496b51f450b462a93b879062e2b37e1975f3e11c54093af1486fe
4
+ data.tar.gz: 3664399997dab3e2b14618fcbe6442671e68c7d9c301ac95eaec98e4e774a167
5
5
  SHA512:
6
- metadata.gz: 385ecb3070b2d84fe26c4aade61a62b7c163cec99b755cdaf6f321dad0cc09f95dec1bc9e87e51f836fa53ace66198f8d18c14057c8fc88ce27decb075abc74a
7
- data.tar.gz: 120f1362eb23e3b6686bab9c98129e5099b3d4652ebee7f298dd5f8bd2c34abf556620981be5b7bb93e31693fb39540de661c282e911eb48c4336bb8fe4e3a57
6
+ metadata.gz: 99e93a4f13e251babc390c237d867aa745e5282da80ac40e5bdf1f94e45311769c77f4b823b113378d6b969039d22ca08ec9054da211f6dac0e99a238730158d
7
+ data.tar.gz: 0c724a1ad7b3d0242587f81cf466b93d8c9a8c81ce0c268aa33dd0107527e7b0c9cb4a85d073a4eb3d386b3a8a821b7a15de4a1dc0546ece186f8bd0a04d4458
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'hystrix_metrics'
3
- s.version = '0.0.1'
3
+ s.version = '0.2.0'
4
4
  s.author = 'Chris Mowforth'
5
5
  s.email = 'chris@mowforth.com'
6
6
  s.license = 'Apache-2.0'
@@ -0,0 +1,32 @@
1
+ require 'hystrix_metrics_jars'
2
+
3
+ module HystrixMetrics
4
+ import com.netflix.hystrix.HystrixCommand
5
+ import com.netflix.hystrix.HystrixCommandKey
6
+ import com.netflix.hystrix.HystrixCommandGroupKey
7
+
8
+ class Command < HystrixCommand
9
+
10
+ def initialize(name, work, fallback=nil, thread_group="Default")
11
+ @name = name
12
+ @work = work
13
+ @fallback = fallback
14
+ super(HystrixCommand::Setter
15
+ .withGroupKey(HystrixCommandGroupKey::Factory.asKey(thread_group))
16
+ .andCommandKey(HystrixCommandKey::Factory.asKey(name)))
17
+ end
18
+
19
+ # Overrides HystrixCommand#run
20
+ # Never call directly! Use Command#execute instead for protection
21
+ def run
22
+ @work.call
23
+ end
24
+
25
+ # Overrides HystrixCommand#getFallback
26
+ def getFallback
27
+ @fallback.nil? ? super : @fallback.call
28
+ end
29
+
30
+ end
31
+
32
+ end
metadata CHANGED
@@ -1,30 +1,30 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hystrix_metrics
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.2.0
5
5
  platform: java
6
6
  authors:
7
7
  - Chris Mowforth
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-10-28 00:00:00.000000000 Z
11
+ date: 2018-11-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: jar-dependencies
15
14
  requirement: !ruby/object:Gem::Requirement
16
15
  requirements:
17
16
  - - "~>"
18
17
  - !ruby/object:Gem::Version
19
18
  version: 0.3.0
20
- type: :runtime
19
+ name: jar-dependencies
21
20
  prerelease: false
21
+ type: :runtime
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: 0.3.0
27
- description:
27
+ description:
28
28
  email: chris@mowforth.com
29
29
  executables: []
30
30
  extensions: []
@@ -39,7 +39,7 @@ files:
39
39
  - lib/commons-lang/commons-lang/2.6/commons-lang-2.6.jar
40
40
  - lib/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.jar
41
41
  - lib/hystrix_metrics.rb
42
- - lib/hystrix_metrics/metric.rb
42
+ - lib/hystrix_metrics/command.rb
43
43
  - lib/hystrix_metrics/metric_server.rb
44
44
  - lib/hystrix_metrics_jars.rb
45
45
  - lib/io/reactivex/rxjava/1.0.10/rxjava-1.0.10.jar
@@ -55,7 +55,7 @@ homepage: https://github.com/m0wfo/hystrix_metrics
55
55
  licenses:
56
56
  - Apache-2.0
57
57
  metadata: {}
58
- post_install_message:
58
+ post_install_message:
59
59
  rdoc_options: []
60
60
  require_paths:
61
61
  - lib
@@ -73,9 +73,9 @@ requirements:
73
73
  - jar com.netflix.hystrix:hystrix-core, 1.4.10
74
74
  - jar com.netflix.hystrix:hystrix-metrics-event-stream, 1.4.10
75
75
  - jar io.undertow:undertow-servlet, 2.0.14.Final
76
- rubyforge_project:
77
- rubygems_version: 2.5.2.3
78
- signing_key:
76
+ rubyforge_project:
77
+ rubygems_version: 2.7.6
78
+ signing_key:
79
79
  specification_version: 4
80
80
  summary: Easily capture & expose Hystrix metrics in JRuby
81
81
  test_files: []
@@ -1,24 +0,0 @@
1
- require 'hystrix_metrics_jars'
2
-
3
- module HystrixMetrics
4
- import com.netflix.hystrix.HystrixCommand
5
- import com.netflix.hystrix.HystrixCommandKey
6
- import com.netflix.hystrix.HystrixCommandGroupKey
7
-
8
- class Metric < HystrixCommand
9
-
10
- attr_reader :command
11
-
12
- def initialize(name, work, group="Default")
13
- @work = work
14
- super(HystrixCommand::Setter
15
- .withGroupKey(HystrixCommandGroupKey::Factory.asKey(group))
16
- .andCommandKey(HystrixCommandKey::Factory.asKey(name)))
17
- end
18
-
19
- def run
20
- @work.call
21
- end
22
- end
23
-
24
- end