GoLang Zookeeper::connect

request it (474)
GoLang replacement for PHP's Zookeeper::connect [edit | history]

Do you know a GoLang replacement for PHP's Zookeeper::connect? Write it!

PHP Zookeeper::connect

PHP original manual for Zookeeper::connect [ show | php.net ]


(PECL zookeeper >= 0.2.0)

Zookeeper::connectCreate a handle to used communicate with zookeeper


public void Zookeeper::connect ( string $host [, callable $watcher_cb = NULL [, int $recv_timeout = 10000 ]] )

This method creates a new handle and a zookeeper session that corresponds to that handle. Session establishment is asynchronous, meaning that the session should not be considered established until (and unless) an event of state ZOO_CONNECTED_STATE is received.



Comma separated host:port pairs, each corresponding to a zk server. e.g. ",,"


The global watcher callback function. When notifications are triggered this function will be invoked.


The timeout for this session, only valid if the connections is currently connected (ie. last watcher state is ZOO_CONNECTED_STATE).


This method emits PHP error/warning when parameters count or types are wrong or could not init instance.


Since version 0.3.0, this method emits ZookeeperException and it's derivatives.

See Also