Пример #1
0
func (sp *StriperPool) Delete(oid string) error {
	c_oid := C.CString(oid)
	defer C.free(unsafe.Pointer(c_oid))
	ret := C.rados_striper_remove(sp.striper, c_oid)
	if ret < 0 {
		return RadosError(int(ret))
	}
	return nil
}
Пример #2
0
// Synchronously removes a striped object
func (rso *RadosStripedObject) Remove() (err error) {
	obj := C.CString(rso.ObjectName)
	defer C.free(unsafe.Pointer(obj))
	ret := C.rados_striper_remove(rso.Striper, obj)
	if ret < 0 && ret != -2 {
		fmt.Println("removing object failed", ret, err)
		return err
	} else {
		return nil
	}
}