ptth/src/bin/ptth_relay.rs

20 lines
417 B
Rust

use std::{
error::Error,
sync::Arc,
};
use ptth::relay;
use ptth::relay::RelayState;
#[tokio::main]
async fn main () -> Result <(), Box <dyn Error>> {
let config_file = ptth::load_toml::load ("config/ptth_relay.toml");
eprintln! ("ptth_relay Git version: {:?}", ptth::git_version::GIT_VERSION);
relay::run_relay (
Arc::new (RelayState::from (&config_file)),
ptth::graceful_shutdown::init ()
).await
}