mqrs/src/main.rs
finga 3572b12a1a Receive message(s) from a queue
This subcommand receives one or more messages from a queue. Three
different methods are supported, read message by message, read until a
given timout or read until a specified date and time. This subcommand
also supports the `--non-blocking` flag.
2021-06-20 16:35:18 +02:00

26 lines
478 B
Rust

use anyhow::Result;
use clap::Clap;
mod cli;
mod create;
mod info;
mod recv;
mod send;
mod unlink;
use cli::{Command, Opts};
fn main() -> Result<()> {
let opts: Opts = Opts::parse();
match opts.command {
Command::Create(c) => c.run(opts.verbose)?,
Command::Info(i) => i.run()?,
Command::Unlink(u) => u.run(opts.verbose)?,
Command::Send(s) => s.run(opts.verbose)?,
Command::Recv(r) => r.run(opts.verbose)?,
}
Ok(())
}