예제 #1
0
파일: conn.go 프로젝트: Xmagicer/origin
// DeletePool deletes a pool and all the data inside the pool.
func (c *Conn) DeletePool(name string) error {
	c_name := C.CString(name)
	defer C.free(unsafe.Pointer(c_name))
	ret := int(C.rados_pool_delete(c.cluster, c_name))
	if ret == 0 {
		return nil
	} else {
		return RadosError(ret)
	}
}
예제 #2
0
파일: rados.go 프로젝트: glycerine/radosgo
// DeletePool deletes the named pool in the given RADOS cluster.
func (r *Rados) DeletePool(poolName string) error {
	cname := C.CString(poolName)
	defer C.free(unsafe.Pointer(cname))

	if cerr := C.rados_pool_delete(r.rados, cname); cerr < 0 {
		return radosReturnCodeError(cerr)
	}

	return nil
}
예제 #3
0
파일: rados.go 프로젝트: Kimbsen/rados.go
// DeletePool deletes the named pool in the given RADOS cluster.
func (r *Rados) DeletePool(poolName string) error {
	cname := C.CString(poolName)
	defer C.free(unsafe.Pointer(cname))

	if cerr := C.rados_pool_delete(r.rados, cname); cerr < 0 {
		return fmt.Errorf("RADOS pool delete %s: %s", poolName, strerror(cerr))
	}

	return nil
}
예제 #4
0
파일: pools.go 프로젝트: objStorage/grados
// DeletePool removes a pool from the cluster.
func (cluster *Cluster) DeletePool(poolName string) error {
	p := C.CString(poolName)
	defer freeString(p)
	ret := C.rados_pool_delete(cluster.handle, p)
	err := toRadosError(ret)
	if err != nil {
		err.Message = fmt.Sprintf("Unable to delete %s pool.", poolName)
		return err
	}
	return nil
}