forked from zk-ruby/zookeeper
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME
42 lines (30 loc) · 955 Bytes
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
zookeeper
An interface to the Zookeeper distributed configuration server.
== 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.