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"] }
|
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"
|
||||||
|
|
||||||
|
31
src/lib.rs
31
src/lib.rs
@ -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;
|
}
|
||||||
*/
|
|
Loading…
Reference in New Issue
Block a user