(bind-func rados-connect-to-cluster
(lambda ()
(let ((ctx:rados_t* (salloc)))
(if (< (rados_create ctx null) 0)
(begin (printf "[rados] error creating context")
(cast null rados_t))
(if (< (rados_conf_read_file (pref ctx 0) null) 0)
(begin (printf "[rados] error reading config file")
(cast null rados_t))
(if (< (rados_connect (pref ctx 0)) 0)
(begin (printf "[rados] error connecting")
(cast null rados_t))
(pref ctx 0)))))))