Sha256: 2f2fd6679fa131339bac726fa659525637f83b1ce8d7dc88d1c20374403b1f3a
Contents?: true
Size: 611 Bytes
Versions: 1
Compression:
Stored size: 611 Bytes
Contents
require 'hystrix_metrics_jars' module HystrixMetrics import com.netflix.hystrix.HystrixCommand import com.netflix.hystrix.HystrixCommandKey import com.netflix.hystrix.HystrixCommandGroupKey class Metric < HystrixCommand attr_reader :command def initialize(name, work, group="Default") @work = work super(HystrixCommand::Setter .withGroupKey(HystrixCommandGroupKey::Factory.asKey(group)) .andCommandKey(HystrixCommandKey::Factory.asKey(name))) end def run @work.call end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
hystrix_metrics-0.0.1-java | lib/hystrix_metrics/metric.rb |