#alive #watch #conf #alter #plugin #constructor #ok

alive_watch

alive_watch : alter plugin for alive

4 releases

0.1.5 Apr 23, 2024
0.1.4 Apr 11, 2024
0.1.3 Apr 11, 2024
0.1.2 Apr 10, 2024

#8 in #alive


Used in 2 crates

Apache-2.0

11KB
262 lines

alive_watch

use std::path::PathBuf;

use alive_watch::Conf;
use aok::{Result, OK};
use static_init::constructor;
use tracing::info;

#[constructor(0)]
extern "C" fn init() {
  loginit::init()
}

#[test]
fn test() -> Result<()> {
  let dir: PathBuf = std::env!("CARGO_MANIFEST_DIR").into();
  let conf = Conf::new(dir.parent().unwrap().join("conf"));
  info!("dir: {:?}", conf);
  for i in conf.cluster("ol")?.iter() {
    dbg!(i);
  }
  OK
}

Dependencies

~6–12MB
~152K SLoC