init bastion

This commit is contained in:
Nadja Reitzenstein 2021-10-27 17:03:50 +02:00
parent 4ff6263db7
commit 082b4cc28a
2 changed files with 21 additions and 14 deletions

View File

@ -23,6 +23,10 @@ lazy_static = "1.4.0"
uuid = { version = "0.8.2", features = ["serde", "v4"] } uuid = { version = "0.8.2", features = ["serde", "v4"] }
async-trait = "0.1.51" async-trait = "0.1.51"
# Runtime
bastion = "0.4"
nuclei = { version = "0.1.3" }
# Catch&Handle POSIX process signals # Catch&Handle POSIX process signals
signal-hook = "0.3.9" signal-hook = "0.3.9"

View File

@ -24,23 +24,26 @@ pub mod error;
pub mod config; pub mod config;
mod permissions; mod permissions;
/*
use clap::{App, Arg}; mod runtime {
use bastion::prelude::*;
use std::io; pub fn startup() {
use std::io::Write; let config = Config::new().hide_backtraces();
use std::path::PathBuf;
use std::str::FromStr;
use std::sync::Arc; Bastion::init_with(config);
use smol::Executor; Bastion::start();
use error::Error; let sup = Bastion::supervisor(|sp| {
sp .with_strategy(SupervisionStrategy::OneForAll)
.children(|children| {
children
})
}).expect("Failed to create supervisor");
}
use slog::Logger; pub fn run() {
Bastion::block_until_stopped()
use paho_mqtt::AsyncClient; }
use crate::config::Config; }
*/