sdf
This commit is contained in:
parent
25bae7a7e1
commit
5b253ebafb
|
|
@ -2,15 +2,21 @@ package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"log"
|
||||||
|
|
||||||
"github.com/ceph/go-ceph/rados"
|
"github.com/ceph/go-ceph/rados"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
params := params{"ceph","admin"}
|
params := params{"ceph","admin","/etc/ceph/ceph.conf"}
|
||||||
connection,err := rados.NewConnWithClusterAndUser(params.cluster,params.user)
|
connection,err := rados.NewConnWithClusterAndUser(params.cluster,params.user)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Println(err)
|
fmt.Println(err)
|
||||||
}
|
}
|
||||||
fmt.Printf("%#v", connection)
|
fmt.Printf("%#v", connection)
|
||||||
|
|
||||||
|
if err = connection.ReadConfigFile(params.config); err != nil {
|
||||||
|
log.Fatalln("Cannot read config file")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,4 +5,5 @@ const config = "/etc/ceph/ceph.conf"
|
||||||
type params struct {
|
type params struct {
|
||||||
cluster string
|
cluster string
|
||||||
user string
|
user string
|
||||||
|
config string
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user