2 releases

0.1.1 May 12, 2020
0.1.0 Aug 28, 2019

#1607 in Database interfaces


Used in 3 crates

MIT license

40KB
833 lines

redis-streams-rs

Build Status

Implements the redis stream trait for redis-rs Rust client. This currently requires running code from redis-rs master (still waiting on a release to be cut and pushed up to Crates.io).

Usage

To use redis-streams-rs, add this to your Cargo.toml:

[dependencies]
redis-streams = "0.1.0"

See redis-rs for details

Build Status

Docs

run make doc to read the documentation.


lib.rs:

redis-streams-rs exposes the Redis Stream functionality as a Trait on top of redis-rs.

The crate is called redis_streams.

In order to you use this crate, you'll first want to add it as a github dependency (until I have a chance to publish on crates.io).

[dependencies.redis_streams]
git = "https://github.com/grippy/redis-streams-rs.git"

From here, just unlock the streaming commands prior to instantiating client connections.

use redis_streams::{client_open,Connection,StreamCommands};
let client = client_open("redis://127.0.0.1/0").unwrap();
let mut con = client.get_connection().unwrap();

This crate also exposes all top-level redis-rs types. To pick up all redis-rs Commands, just use the Commands trait.

use redis_streams::{Commands};

Dependencies

~3.5–5MB
~90K SLoC