generated from Patagia/template-nix
parent
7b273c7245
commit
af28c60984
14 changed files with 1596 additions and 66 deletions
controller
17
controller/Cargo.toml
Normal file
17
controller/Cargo.toml
Normal file
|
@ -0,0 +1,17 @@
|
|||
[package]
|
||||
name = "patagia-controller"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
license = "MPL-2.0"
|
||||
|
||||
[dependencies]
|
||||
anyhow.workspace = true
|
||||
clap.workspace = true
|
||||
tokio.workspace = true
|
||||
tracing.workspace = true
|
||||
tracing-chrome.workspace = true
|
||||
tracing-subscriber.workspace = true
|
||||
|
||||
[[bin]]
|
||||
name = "patagia-controller"
|
||||
doc = false
|
24
controller/src/main.rs
Normal file
24
controller/src/main.rs
Normal file
|
@ -0,0 +1,24 @@
|
|||
use anyhow::Result;
|
||||
use clap::Parser;
|
||||
use tokio::time::{sleep, Duration};
|
||||
use tracing_subscriber::prelude::*;
|
||||
|
||||
#[derive(Parser, Debug)]
|
||||
#[command(version, about, long_about = None)]
|
||||
struct Cli {}
|
||||
|
||||
#[tokio::main]
|
||||
async fn main() -> Result<()> {
|
||||
let _args = Cli::parse();
|
||||
let fmt_layer = tracing_subscriber::fmt::layer();
|
||||
|
||||
tracing_subscriber::registry()
|
||||
.with(tracing_subscriber::EnvFilter::from_default_env())
|
||||
.with(fmt_layer)
|
||||
.init();
|
||||
|
||||
tracing::info!("Patagia Controller");
|
||||
|
||||
sleep(Duration::from_secs(3)).await;
|
||||
Ok(())
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue