Giter Club home page Giter Club logo

riak-rust-client's Introduction

Important Warning

When this client was originally written I was working at Basho technologies (we were the the original developers of Riak). Shortly after I started this client the company ended up having significant problems and I ended up leaving the company. I shelved and archived this repository uncertain of Riak's future and otherwise not having a reason to continue developing it. 6 years later it came to my attention that there is some active usage and interest in the continuation of this client, so it was un-archived and made available for forking. Where it goes from here depends on interest: if you're interested in contributing and helping move it forward I'm open to new issues, discussions and PRs. If contributions and interest keeps coming in I will consider quantifying and organizing a v1 release of the client. Otherwise if there's not much engagement in the coming year I'll likely archive it once again.

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();

riak-rust-client's People

Contributors

shaneutt avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.