Crates.io | beanstalkd |
lib.rs | beanstalkd |
version | 0.4.1 |
source | src |
created_at | 2014-12-06 15:50:28.149334 |
updated_at | 2018-05-31 10:51:01.817058 |
description | Easy-to-use beanstalkd client for Rust (IronMQ compatible) |
homepage | https://github.com/schickling/rust-beanstalkd |
repository | https://github.com/schickling/rust-beanstalkd |
max_upload_size | |
id | 468 |
size | 27,630 |
Easy-to-use beanstalkd client for Rust (IronMQ compatible)
Add this dependency to your Cargo.toml
beanstalkd = "*"
More documentation can be found here.
extern crate beanstalkd;
use beanstalkd::Beanstalkd;
fn main() {
let mut beanstalkd = Beanstalkd::localhost().unwrap();
let _ = beanstalkd.put("Hello World", 0, 0, 10000);
}
extern crate beanstalkd;
use beanstalkd::Beanstalkd;
fn main() {
let mut beanstalkd = Beanstalkd::localhost().unwrap();
let (id, body) = beanstalkd.reserve().unwrap();
println!("{}", body);
let _ = beanstalkd.delete(id);
}
extern crate beanstalkd;
use beanstalkd::Beanstalkd;
fn main() {
let host = "mq-aws-us-east-1.iron.io";
let token = "your token";
let project_id = "your project id - not the name";
let mut beanstalkd = Beanstalkd::connect(host, 11300).unwrap();
let _ = beanstalkd.put(format!("oauth {} {}", token, project_id).as_slice(), 0, 0, 10000);
let _ = beanstalkd.put("Hello World", 0, 0, 10000);
}
Licensed under either of
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.