lib: implement WaitForLatestOSDMap

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
This commit is contained in:
Noah Watkins 2014-05-26 11:38:46 -07:00
parent 8659a52379
commit fc036b6edd
1 changed files with 11 additions and 0 deletions

11
conn.go
View File

@ -118,3 +118,14 @@ func (c *Conn) SetConfigOption(option, value string) error {
return nil
}
}
// WaitForLatestOSDMap blocks the caller until the latest OSD map has been
// retrieved. It returns an error, if any.
func (c *Conn) WaitForLatestOSDMap() error {
ret := C.rados_wait_for_latest_osdmap(c.cluster)
if ret < 0 {
return RadosError(int(ret))
} else {
return nil
}
}