diff --git a/ceph/ceph.go b/ceph/ceph.go index d757da4..b68b5f2 100644 --- a/ceph/ceph.go +++ b/ceph/ceph.go @@ -2,15 +2,21 @@ package main import ( "fmt" + "log" + "github.com/ceph/go-ceph/rados" ) func main() { - params := params{"ceph","admin"} + params := params{"ceph","admin","/etc/ceph/ceph.conf"} connection,err := rados.NewConnWithClusterAndUser(params.cluster,params.user) if err != nil { fmt.Println(err) } fmt.Printf("%#v", connection) + + if err = connection.ReadConfigFile(params.config); err != nil { + log.Fatalln("Cannot read config file") + } } diff --git a/ceph/types.go b/ceph/types.go index c4ad12d..b07ef64 100644 --- a/ceph/types.go +++ b/ceph/types.go @@ -5,4 +5,5 @@ const config = "/etc/ceph/ceph.conf" type params struct { cluster string user string + config string }