✨ mqtt connections
almost working, need encryption
This commit is contained in:
parent
20ab0153d1
commit
125d50530d
15 changed files with 1259 additions and 42 deletions
|
@ -7,14 +7,16 @@ pub struct Machine {
|
|||
pub id: Id,
|
||||
pub hostname: String,
|
||||
pub token: String,
|
||||
pub identity: (String, String),
|
||||
pub next_token: Option<String>,
|
||||
}
|
||||
|
||||
impl Machine {
|
||||
pub fn from_join_param(join: api::JoinParams) -> Self {
|
||||
Self {
|
||||
id: Id::String(join.machine_id),
|
||||
id: Id::String(join.machine_id.trim().to_string()),
|
||||
hostname: join.hostname.trim().to_string(),
|
||||
identity: join.identity,
|
||||
token: generate_token(),
|
||||
next_token: None,
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue