1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
use super::data::*;
use super::network::*;
use chrono::{DateTime, Utc};
use std::collections::HashMap;
pub trait ClusterCommunicator {
fn send_message(&self, target: &str, msg: &Message) -> bool;
fn handle_message(&mut self, msg: &Message);
fn get_nghbr_sample(&self, a: &HashMap<String, DateTime<Utc>>) -> Vec<String>;
fn comm_recv_gossip(&mut self, payload: &Vec<String>);
fn update_neighbors(&mut self);
fn delinquent_node_check(&mut self);
}
pub trait ClusterCommunicationReceiver {
fn heartbeat_response(peer: &str);
fn sync_response(info: MachineInfo);
}
pub trait DeploymentCommunicator {
fn request_run_deployment(deployment: Deployment);
}
pub trait DeploymentCommunicationReceiver {}