2022-01-27 15:19:20 +00:00
|
|
|
package rados
|
|
|
|
|
|
|
|
// #cgo LDFLAGS: -lrados
|
|
|
|
// #include <rados/librados.h>
|
|
|
|
// #include <stdlib.h>
|
|
|
|
//
|
|
|
|
import "C"
|
|
|
|
|
2022-02-08 14:47:39 +00:00
|
|
|
// AssertVersion ensures that the object exists and that its internal version
|
|
|
|
// number is equal to "ver" before writing. "ver" should be a version number
|
|
|
|
// previously obtained with IOContext.GetLastVersion().
|
2022-01-27 15:19:20 +00:00
|
|
|
//
|
|
|
|
// Implements:
|
2023-02-09 17:23:11 +00:00
|
|
|
//
|
|
|
|
// void rados_read_op_assert_version(rados_read_op_t read_op,
|
|
|
|
// uint64_t ver)
|
2022-01-27 15:19:20 +00:00
|
|
|
func (w *WriteOp) AssertVersion(ver uint64) {
|
|
|
|
C.rados_write_op_assert_version(w.op, C.uint64_t(ver))
|
|
|
|
}
|