示例#1
0
 /**
  * @throws IOException
  */
 public function stream_close()
 {
     $res = \rados_ioctx_destroy($this->ioctx);
     if ($res < 0) {
         throw new IOException('Could not destroy io context after reading ' . $this->stat['oid']);
     }
     $ret = \rados_shutdown($this->rados);
     if ($ret < 0) {
         throw new IOException('Could not shutdown rados resource');
     }
 }
示例#2
0
<?php

$rados = rados_create();
rados_conf_read_file($rados, "/etc/ceph/ceph.conf");
rados_connect($rados);
$io = rados_ioctx_create($rados, "rbd");
var_dump(rados_ioctx_pool_stat($io));
rados_ioctx_destroy($io);
rados_shutdown($rados);
示例#3
0
 /**
  * @depends testRadosConnect
  */
 public function testRadosShutDown($cluster)
 {
     $this->assertTrue(rados_shutdown($cluster));
 }
示例#4
0
文件: Cluster.php 项目: shen2/rados
 /**
  * 
  * @return self
  */
 public function shutdown()
 {
     \rados_shutdown($this->_cluster);
     return $this;
 }