Crate riak [] [src]

A Riak client for Rust.

This client can be used to communicate with Riak clusters to send and receive objects and other information. Operations are done through the Client struct and there are several other structs designed to build data structures for sending and receiving data from a Riak cluster.

Examples:

Storing an object is the most fundamental operation of Riak, it can be done like the following:

use riak::Client;
use riak::object::{ObjectContent, StoreObjectReq};

// connect to Riak and ping the server
let mut riak = Client::new("10.0.0.2:8087").unwrap();
riak.ping().unwrap();

// prepare an object
let contents = ObjectContent::new("I am the night, I am Batman!".as_bytes());

// build a request to store the object
let bucket_name = "superheroes".to_string();
let mut req = StoreObjectReq::new(&bucket_name, &contents);
req.set_key("batman");

// store the object
riak.store_object(&req).unwrap();

Modules

bucket
errors
object

Structs

Client

Client Represents a connection to a Riak server's Protocol Buffers API.