Sha256: 576d7ae705899da9f2944e56708ff9056afd8935bad58ed5fe64b8877a8eca1e
Contents?: true
Size: 763 Bytes
Versions: 29
Compression:
Stored size: 763 Bytes
Contents
module SplitIoClient module Cache module Repositories module Events class RedisRepository < EventsRepository EVENTS_SLICE = 100 def initialize(adapter, config) @adapter = adapter @config = config end def add(key, traffic_type, event_type, time, value) @adapter.add_to_queue( namespace_key('.events'), { m: metadata, e: event(key, traffic_type, event_type, time, value) }.to_json, ) end def clear @adapter.get_from_queue(namespace_key('.events'), EVENTS_SLICE).map do |e| JSON.parse(e, symbolize_names: true) end end end end end end end
Version data entries
29 entries across 29 versions & 1 rubygems