mirror of
https://github.com/ceph/go-ceph
synced 2024-12-22 06:10:09 +00:00
520018f6ef
Signed-off-by: Sven Anderson <sven@redhat.com>
23 lines
617 B
Go
23 lines
617 B
Go
//go:build ceph_preview
|
|
// +build ceph_preview
|
|
|
|
package rados
|
|
|
|
// #cgo LDFLAGS: -lrados
|
|
// #include <rados/librados.h>
|
|
// #include <stdlib.h>
|
|
//
|
|
import "C"
|
|
|
|
// 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().
|
|
// PREVIEW
|
|
//
|
|
// Implements:
|
|
// void rados_read_op_assert_version(rados_read_op_t read_op,
|
|
// uint64_t ver)
|
|
func (w *WriteOp) AssertVersion(ver uint64) {
|
|
C.rados_write_op_assert_version(w.op, C.uint64_t(ver))
|
|
}
|