Skip to content
This repository has been archived by the owner. It is now read-only.
A Riak client written in Mozilla's Rust programming language
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
build
src
tests
.gitignore
.gitmodules
.travis.yml
Cargo.toml
LICENSE
Makefile
README.md

README.md

READ THIS FIRST

This client has been shelfed, and archived. I have no intention currently of continuing development for it due to the state of Riak itself. Because it got shelved so quickly after I started it, it never matured or became production ready. This client should be considered unsuitable for production.

riak-rust-client

Build Status Docs crates.io License

A Riak client for Rust.

Full documentation available on docs.rs.

Description

This client allows you to connect to the Protocol Buffers API of a Riak Node and use the functionality provided to send data, retrieve data, and otherwise communicate with Riak.

This client communicates directly with the Protocol Buffer API on a specified Riak node, and does not provide any abstractions around a cluster of nodes.

Requirements

  • This client is tested against Rust's stable, beta, and nightly branches. It should work with any modern Rust.

  • Intended to work with Riak KV 2.1.4+

Installation

Add riak as a Cargo.toml dependency to your project:

[dependencies]
riak = "*"

Select a specific version.

Usage

Examples

Storing an object:

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();
You can’t perform that action at this time.