mirror of
https://github.com/EasyTier/EasyTier.git
synced 2026-05-06 17:59:11 +00:00
set hostname when connecting to config-server (#712)
This commit is contained in:
@@ -19,13 +19,15 @@ use crate::{
|
||||
|
||||
pub struct Controller {
|
||||
token: String,
|
||||
hostname: String,
|
||||
instance_map: DashMap<uuid::Uuid, NetworkInstance>,
|
||||
}
|
||||
|
||||
impl Controller {
|
||||
pub fn new(token: String) -> Self {
|
||||
pub fn new(token: String, hostname: String) -> Self {
|
||||
Controller {
|
||||
token,
|
||||
hostname,
|
||||
instance_map: DashMap::new(),
|
||||
}
|
||||
}
|
||||
@@ -80,6 +82,10 @@ impl Controller {
|
||||
pub fn token(&self) -> String {
|
||||
self.token.clone()
|
||||
}
|
||||
|
||||
pub fn hostname(&self) -> String {
|
||||
self.hostname.clone()
|
||||
}
|
||||
}
|
||||
|
||||
#[async_trait::async_trait]
|
||||
|
||||
Reference in New Issue
Block a user