From 728afd56befe6752c7904409da0f1199c85a921f Mon Sep 17 00:00:00 2001 From: Noah Watkins Date: Sat, 30 Aug 2014 10:29:17 -0700 Subject: [PATCH] lib: update comments Signed-off-by: Noah Watkins --- conn.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/conn.go b/conn.go index 5b07b2f..e0a8637 100644 --- a/conn.go +++ b/conn.go @@ -19,6 +19,7 @@ type Conn struct { cluster C.rados_t } +// PingMonitor sends a ping to a monitor and returns the reply. func (c *Conn) PingMonitor(id string) (string, error) { c_id := C.CString(id) defer C.free(unsafe.Pointer(c_id)) @@ -48,10 +49,12 @@ func (c *Conn) Connect() error { } } +// Shutdown disconnects from the cluster. func (c *Conn) Shutdown() { C.rados_shutdown(c.cluster) } +// ReadConfigFile configures the connection using a Ceph configuration file. func (c *Conn) ReadConfigFile(path string) error { c_path := C.CString(path) defer C.free(unsafe.Pointer(c_path)) @@ -63,6 +66,8 @@ func (c *Conn) ReadConfigFile(path string) error { } } +// ReadDefaultConfigFile configures the connection using a Ceph configuration +// file located at default locations. func (c *Conn) ReadDefaultConfigFile() error { ret := C.rados_conf_read_file(c.cluster, nil) if ret == 0 { @@ -84,7 +89,7 @@ func (c *Conn) OpenPool(pool string) (*Pool, error) { } } -// ListPools returns the current list of pool names. +// ListPools returns the names of all existing pools. func (c *Conn) ListPools() (names []string, err error) { buf := make([]byte, 4096) for {