diplonat helps you exposing your public services in a dynamic environment
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

21 lines
440 B

use anyhow::{Result, Context};
use log::*;
use crate::*;
pub struct DiplonatContext {
pub config: config::DiplonatConfig,
pub gateway: igd::aio::Gateway
}
pub async fn setup() -> Result<DiplonatContext> {
let ctx = DiplonatContext {
config: config::load_env().context("Unable to read configuration from environment")?,
gateway: gw::get_gateway().await?
};
return Ok(ctx);
}
pub fn listen() -> bool {
return true;
}