예제 #1
0
파일: grados.go 프로젝트: objStorage/grados
// Version will return current librados version.
func Version() string {
	var major, minor, extra C.int
	C.rados_version(&major, &minor, &extra)
	return fmt.Sprintf("v%d.%d.%d", major, minor, extra)
}
예제 #2
0
// Version returns the major, minor, and patch components of the version of
// the RADOS library linked against.
func Version() (int, int, int) {
	var c_major, c_minor, c_patch C.int
	C.rados_version(&c_major, &c_minor, &c_patch)
	return int(c_major), int(c_minor), int(c_patch)
}