func (c *AioCompletion) Create() error { ret := C.rados_aio_create_completion(nil, nil, nil, (*C.rados_completion_t)(&c.completion)) if ret >= 0 { return nil } else { return RadosError(int(ret)) } }
// AsyncMode Prepares the object for asynchronous operations. If callbacks are set to nil, the results will be ignored. // args passed here will be passed to the callbacks. func (o *Object) AsyncMode(onComplete, onSafe AsyncIoCallback, onError ASyncIoErrorCallback, args ...interface{}) *AsyncObject { a := &AsyncObject{ ioContext: o.ioContext, name: o.name, onComplete: onComplete, onSafe: onSafe, args: args, } C.rados_aio_create_completion(nil, nil, nil, &a.completion) return a }