diff --git a/README.md b/README.md index 5c6ac28..40a06a9 100644 --- a/README.md +++ b/README.md @@ -44,6 +44,28 @@ err := conn.ParseCmdLineArgs(args) For other configuration options see the full documentation. +### Object I/O + +Object in RADOS can be written to and read from with through an interface very +similar to a standard file I/O interface: + +```go + // open a pool handle + pool, err := conn.OpenPool("mypool") + + // write some data + bytes_in := []byte("input data") + err = pool.Write("obj", bytes_in, 0) + + // read the data back out + bytes_out := make([]byte, len(bytes_in)) + n_out, err := pool.Read("obj", bytes_out, 0) + + if bytes_in != bytes_out { + fmt.Println("Output is not input!") + } +``` + ### Pool maintenance The list of pools in a cluster can be retreived using the `ListPools` method