Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Zookeeper bindings for Ruby (1.8, 1.9 compatible with watches and callbacks)
Ruby C Other
tag: release/0.2.11

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
examples
ext
java
lib
spec
test
.gitignore
CHANGELOG
Gemfile
LICENSE
Manifest
README.markdown
Rakefile
notes.txt
slyphon-zookeeper.gemspec

README.markdown

zookeeper

An interface to the Zookeeper distributed configuration server.

For a higher-level interface with a slightly more convenient API and features such as locks, have a look at ZK (also available is ZK-EventMachine for those who prefer async).

License

Copyright 2008 Phillip Pearson, and 2010 Twitter, Inc. Licensed under the MIT License. See the included LICENSE file. Portions copyright 2008-2010 the Apache Software Foundation, licensed under the Apache 2 license, and used with permission.

Install

sudo gem install zookeeper

Usage

Connect to a server:

require 'rubygems'
require 'zookeeper'
z = Zookeeper.new("localhost:2181")
z.get_children(:path => "/")

Idioms

The following methods are initially supported:

  • get
  • set
  • get_children
  • stat
  • create
  • delete
  • get_acl
  • set_acl

All support async callbacks. get, get_children and stat support both watchers and callbacks.

Calls take a dictionary of parameters. With the exception of set_acl, the only required parameter is :path. Each call returns a dictionary with at minimum two keys :req_id and :rc.

Something went wrong with that request. Please try again.