php创建zookeeper临时变量

临时变量会在连接断开之后被删除。

<?php
        $zookeeper = new Zookeeper("127.0.0.1:2182");
        $k = "/zk_test3";
        $acl = array(
                array(
                'perms' => Zookeeper::PERM_ALL,
                'scheme' => 'world',
                'id' => 'anyone',
        ));
        $zookeeper->create("/zk_test3", "1000", $acl, Zookeeper::EPHEMERAL);
        print_r(array(
                $zookeeper->get($k), 
        ));
        sleep(5);

 

 

 

你可能感兴趣的:(zookeeper)