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.

This client uses Riak's Protocol Buffers API.

See the Protocol Buffers API documentation for more info: https://docs.basho.com/riak/kv/latest/developing/api/protocol-buffers/

Examples:

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

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 the object contents
let contents = ObjectContent::new("This is test data!".as_bytes());

// build a request to store the object
let mut store_request = StoreObjectReq::new("testbucket", contents);
store_request.set_key("testkey");

// store the object
riak.store_object(store_request).unwrap();

Modules

bucket
errors
object
preflist
stream
yokozuna

Structs

Client

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