https://github.com/acalephstorage/grados
[deprecated] Grados is a go library for communicating with Ceph RADOS
https://github.com/acalephstorage/grados
Last synced: 25 days ago
JSON representation
[deprecated] Grados is a go library for communicating with Ceph RADOS
- Host: GitHub
- URL: https://github.com/acalephstorage/grados
- Owner: AcalephStorage
- License: apache-2.0
- Created: 2014-11-17T05:18:27.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2015-06-30T01:52:42.000Z (almost 11 years ago)
- Last Synced: 2025-01-02T18:19:20.562Z (over 1 year ago)
- Language: Go
- Homepage:
- Size: 207 KB
- Stars: 2
- Watchers: 22
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
grados
======
Package grados is a go library for communicating with librados. This requires that the host machine this runs on has ceph
and the librados library.
Usage
To start communicating with ceph, a connection to a cluster needs to be established.
Connect to the default cluster using the configuration found in /etc/ceph:
// connect to default cluster
cluster, err := rados.ConnectToDefaultCluster()
// disconnect from cluster
cluster.Shutdown()
Basic pool operations can be done:
// create a pool
err := cluster.CreatePool("new_pool")
// deletes a pool
err := cluster.DeletePool("new_pool")
// manage a pool
pool, err := cluster.CreatePool("new_pool")
// stop managing the pool
pool.Close()
Basic object operations:
// manage an object
object := pool.ManageObject("object_name")
// write to object
err := object.WriteFull(my_data_reader)
// read from an object
reader, err := object.Read(lengthToRead, offset)
// remove an object
err := object.Remove()
Async object operations:
// manage object asynchronously
asyncObject := pool.ManageObject("my_object").AsyncMode(completeCallback, safeCallback, errCallback, "arg1", "arg2")
// async write
asyncObject.WriteFull(my_data_reader)
// async read. result will be stored in args.
asyncObject.Read(10, 0)
// async remove.
asyncObjet.Remove()
Other features implemented are:
- pool snapshots
- managed-snapshots
- read/write transactions
- object extended attributes
Missing implementation:
- OMAP/TMAP operations (TODO)
- class executions (TODO)
- mon/osd/pg commands (necessary?)
- watch/unwatch/notify objects (still looking for a way to do this)
## More info [here](http://godoc.org/github.com/AcalephStorage/grados)
_Still WIP_