How to use the zookeeper.ZNODEEXISTS function in zookeeper

To help you get started, we’ve selected a few zookeeper examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github howech / gestalt / examples / cluster.js View on Github external
var next = function(rc,err,pth) {
	if( rc && rc != ZooKeeper.ZNODEEXISTS ) {
	    cb( new Error("Unable to create node: " + path + " :" +err ) );
	} else {
	    if( segments.length > 0 ) {
		p = p + "/" + segments.shift();
		zk.a_create( p, '', 0, next );
	    } else {
		cb();
	    }
	}
    };
    next();