Sha256: e192b521cbe0cf0fa8057c430fbed39b6bd70235ce35f6c30eaab2413652ba04

Contents?: true

Size: 346 Bytes

Versions: 2

Compression:

Stored size: 346 Bytes

Contents

require 'rollout/zookeeper/distributed_hashtable'

module Rollout::Zookeeper
  class Storage
    def initialize(zk, path, options = {})
      @cache = ::Rollout::Zookeeper::DistributedHashtable.new(zk, path, options)
    end
  
    def get(key)
      @cache[key]
    end
  
    def set(key, value)
      @cache[key] = value.to_s
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rollout-zk-1.0.1 lib/rollout/zookeeper/storage.rb
rollout-zk-1.0.0 lib/rollout/zookeeper/storage.rb