Struct beanstalkd::Beanstalkd
[−]
[src]
pub struct Beanstalkd { /* fields omitted */ }
Methods
impl Beanstalkd
[src]
pub fn connect(host: &str, port: u16) -> Result<Beanstalkd, BeanstalkdError>
[src]
Connect to a running beanstalkd server
Example: let mut beanstalkd = Beanstalkd::connect('localhost', 11300).unwrap();
pub fn localhost() -> Result<Beanstalkd, BeanstalkdError>
[src]
Short hand method to connect to localhost:11300
pub fn tube(&mut self, tube: &str) -> Result<(), BeanstalkdError>
[src]
Change the tube where put new messages (Standard tube is called default
)
pub fn put(
&mut self,
body: &str,
priority: u32,
delay: u32,
ttr: u32
) -> Result<u64, BeanstalkdError>
[src]
&mut self,
body: &str,
priority: u32,
delay: u32,
ttr: u32
) -> Result<u64, BeanstalkdError>
Inserts a job into the client's currently used tube
pub fn reserve(&mut self) -> Result<(u64, String), BeanstalkdError>
[src]
Get the next message out of the queue
pub fn delete(&mut self, id: u64) -> Result<(), BeanstalkdError>
[src]
Deletes a message out of the queue
pub fn stats(&mut self) -> Result<HashMap<String, String>, BeanstalkdError>
[src]
Returns all available stats