Sha256: 95f67cf93c3f8c4d374dbb014547e5c3ef695edb7189437a0a62343ccf0cb693
Contents?: true
Size: 819 Bytes
Versions: 25
Compression:
Stored size: 819 Bytes
Contents
module SplitIoClient module Cache module Repositories # Repository which forwards impressions interface to the selected adapter class MetricsRepository < Repository extend Forwardable def_delegators :@adapter, :add_count, :add_latency, :add_gauge, :counts, :latencies, :gauges, :clear_counts, :clear_latencies, :clear_gauges def initialize(adapter, config) @config = config @adapter = case adapter.class.to_s when 'SplitIoClient::Cache::Adapters::MemoryAdapter' Repositories::Metrics::MemoryRepository.new(adapter, config) when 'SplitIoClient::Cache::Adapters::RedisAdapter' Repositories::Metrics::RedisRepository.new(adapter, config) end end end end end end
Version data entries
25 entries across 25 versions & 1 rubygems