Sha256: 4b18177b609851d2464b346f2e4c9f96f3ec59ba65b7accfc229eaf704b76719
Contents?: true
Size: 776 Bytes
Versions: 52
Compression:
Stored size: 776 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, :clear def initialize(adapter) @adapter = case adapter.class.to_s when 'SplitIoClient::Cache::Adapters::MemoryAdapter' Repositories::Metrics::MemoryRepository.new(adapter) when 'SplitIoClient::Cache::Adapters::RedisAdapter' Repositories::Metrics::RedisRepository.new(adapter) end end end end end end
Version data entries
52 entries across 52 versions & 1 rubygems