Exemplo n.º 1
0
// 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)
	}
}
Exemplo n.º 2
0
// 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
}
Exemplo n.º 3
0
// 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
}
Exemplo n.º 4
0
// 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
}