From 5b253ebafb45e5d2935db1323eb56f9c6d38e4a2 Mon Sep 17 00:00:00 2001 From: Alexander Pivkin Date: Fri, 5 Sep 2025 15:58:57 +0300 Subject: [PATCH] sdf --- ceph/ceph.go | 8 +++++++- ceph/types.go | 1 + 2 files changed, 8 insertions(+), 1 deletion(-) 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 }