Trait almost_raft::Node [−][src]
pub trait Node { type NodeType; fn send_message<'life0, 'async_trait>(
&'life0 self,
msg: Message<Self::NodeType>
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where
'life0: 'async_trait,
Self: 'async_trait; fn node_id(&self) -> &String; fn service_instance_id(&self) -> &String { ... } }
Expand description
A Cluster node
Associated Types
Required methods
send message to the node
Provided methods
fn service_instance_id(&self) -> &String
fn service_instance_id(&self) -> &String
Provide implementation to get id provided by service discovery provider(e.g. Kubernetes).
By default this function is an alias to Self::node_id