Crates.io | disque-cli |
lib.rs | disque-cli |
version | 0.2.1 |
source | src |
created_at | 2016-02-21 15:35:22.659661 |
updated_at | 2016-06-04 03:59:30.912811 |
description | Redis CLI. |
homepage | https://github.com/iorust/disque-cli |
repository | https://github.com/iorust/disque-cli.git |
max_upload_size | |
id | 4237 |
size | 24,054 |
Disque CLI.
git clone https://github.com/iorust/disque-cli.git && cd disque-cli && cargo build --release
target/release/disque-cli -h 127.0.0.1 -p 7711
More help:
target/release/disque-cli --help
extern crate disque_cli;
// exports:
use disque_cli::{create_client, Client, COMMANDS, Value, encode_slice, Decoder};
Re-exports from the https://github.com/iorust/resp
fn create_client(host: &str, port: u16, password: &str) -> io::Result<Client>
let mut client = create_client("127.0.0.1", 7711, "").expect("Failed to connect");
client.cmd(&["hello"]).unwrap();
struct Client {
// some fields omitted
}
fn new<A: ToSocketAddrs>(addrs: A) -> Self
let mut client = Client::new((hostname, port));
fn cmd(&mut self, slice: &[&str]) -> Result<Value>
client.cmd(&["addjob", "test", "hello, world!", "100"]).unwrap(); // Value::String("hello!")
fn read_more(&mut self) -> Result<Value>
Some commands will have one more replies. This method use to read them.
client.read_more().unwrap();
https://github.com/iorust/disque-cli/blob/master/src/command.rs