mirror of
https://gitlab.com/fabinfra/fabaccess/bffh.git
synced 2024-11-22 06:47:56 +01:00
init bastion
This commit is contained in:
parent
4ff6263db7
commit
082b4cc28a
@ -23,6 +23,10 @@ lazy_static = "1.4.0"
|
||||
uuid = { version = "0.8.2", features = ["serde", "v4"] }
|
||||
async-trait = "0.1.51"
|
||||
|
||||
# Runtime
|
||||
bastion = "0.4"
|
||||
nuclei = { version = "0.1.3" }
|
||||
|
||||
# Catch&Handle POSIX process signals
|
||||
signal-hook = "0.3.9"
|
||||
|
||||
|
31
src/lib.rs
31
src/lib.rs
@ -24,23 +24,26 @@ pub mod error;
|
||||
pub mod config;
|
||||
mod permissions;
|
||||
|
||||
/*
|
||||
|
||||
use clap::{App, Arg};
|
||||
mod runtime {
|
||||
use bastion::prelude::*;
|
||||
|
||||
use std::io;
|
||||
use std::io::Write;
|
||||
use std::path::PathBuf;
|
||||
use std::str::FromStr;
|
||||
pub fn startup() {
|
||||
let config = Config::new().hide_backtraces();
|
||||
|
||||
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;
|
||||
|
||||
use paho_mqtt::AsyncClient;
|
||||
use crate::config::Config;
|
||||
*/
|
||||
pub fn run() {
|
||||
Bastion::block_until_stopped()
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user