2014-05-24 18:13:54 +00:00
|
|
|
# go-rados - Go bindings for RADOS distributed object store
|
|
|
|
|
|
|
|
## Installation
|
|
|
|
|
|
|
|
go get github.com/noahdesu/go-rados
|
|
|
|
|
|
|
|
The native RADOS library and development headers are expected to be installed.
|
|
|
|
|
|
|
|
## Documentation
|
|
|
|
|
|
|
|
Detailed documentation is available at
|
|
|
|
<http://godoc.org/github.com/noahdesu/go-rados>.
|
2014-05-26 18:14:12 +00:00
|
|
|
|
|
|
|
## Example
|
|
|
|
|
|
|
|
Connect to a cluster and list the pools:
|
|
|
|
|
|
|
|
```go
|
|
|
|
conn, _ := rados.NewConn()
|
|
|
|
conn.ReadDefaultConfigFile()
|
|
|
|
conn.Connect()
|
|
|
|
pools, _ := conn.ListPools()
|
|
|
|
fmt.Println(len(pools), pools)
|
|
|
|
```
|
|
|
|
|
|
|
|
will print:
|
|
|
|
|
|
|
|
3 [data metadata rbd]
|