Skip to content

sunnycode/zkws-client-ruby

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

# Ruby Client for ZooKeeper <--> WebSocket bridge

Used for fast failover and dynamic configuration.

Point the UpdateClient instance at your WebSocket server
instance.

Clients will receive data values upon connecting,
as well as after any disconnect/reconnect operations.

# Usage

    require 'zkws-client'

    handler = lambda {|data| puts data.inspect}

    client = ZkWs::Client.new('http://localhost:8080/', handler)
    client.watch '/foo'
    client.watch '/bar'

    loop do
      # keep spinning...
      sleep 5
    end

* The handler receives all 'update' callbacks
* The path is stored under the 'path' attribute of the callback data

About

ZooKeeper <--> Websocket bridge client for Ruby

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages