21 lines
437 B
Rust
21 lines
437 B
Rust
use igd::Gateway;
|
|
use anyhow::{Result, Context};
|
|
|
|
use crate::*;
|
|
|
|
pub struct DiplonatContext {
|
|
pub config: config::DiplonatConfig,
|
|
//pub gateway: igd::Gateway
|
|
}
|
|
|
|
pub fn setup() -> Result<DiplonatContext> {
|
|
return Ok(DiplonatContext {
|
|
config: config::load_env().context("Unable to read configuration from environment")?,
|
|
//gateway: search_gateway(Default::default()).await
|
|
});
|
|
}
|
|
|
|
pub fn listen() -> bool {
|
|
return true;
|
|
}
|