mirror of https://github.com/ceph/go-ceph
rados: support fetching the cluster from the Conn
The cephfs function ceph_create_from_rados requires the cluster_t value, which is current private to the Conn type. Alias the cluster_t type and allow other pkgs to get it if needed. Signed-off-by: John Mulligan <jmulligan@redhat.com>
This commit is contained in:
parent
7ccc2a2d9b
commit
46ed646e03
|
@ -30,6 +30,14 @@ type Conn struct {
|
|||
connected bool
|
||||
}
|
||||
|
||||
// ClusterRef represents a fundamental RADOS cluster connection.
|
||||
type ClusterRef C.rados_t
|
||||
|
||||
// Cluster returns the underlying RADOS cluster reference for this Conn.
|
||||
func (c *Conn) Cluster() ClusterRef {
|
||||
return ClusterRef(c.cluster)
|
||||
}
|
||||
|
||||
// PingMonitor sends a ping to a monitor and returns the reply.
|
||||
func (c *Conn) PingMonitor(id string) (string, error) {
|
||||
c_id := C.CString(id)
|
||||
|
|
Loading…
Reference in New Issue