use hippotat::prelude::*;
use hippotat_macros::into_crlfs;
+#[derive(StructOpt,Debug)]
+pub struct Opts {
+ #[structopt(flatten)]
+ config: config::Opts,
+}
+
type OutstandingRequest<'r> = Pin<Box<
dyn Future<Output=Option<Bytes>> + Send + 'r
>>;
#[tokio::main]
async fn main() -> Result<(), AE> {
- let ics = config::read(LinkEnd::Client)?;
+ let opts = Opts::from_args();
+
+ let ics = config::read(&opts.config, LinkEnd::Client)?;
if ics.is_empty() { throw!(anyhow!("no associations with server(s)")); }
env_logger::init();
}
#[throws(AE)]
-pub fn read(end: LinkEnd) -> Vec<InstanceConfig> {
- let opts = config::Opts::from_args();
-
+pub fn read(opts: &Opts, end: LinkEnd) -> Vec<InstanceConfig> {
let agg = (||{
let mut agg = Aggregate::default();
agg.keys_allowed.extend(