meta_srv::lease

Function lookup_datanode_peer

Source
pub async fn lookup_datanode_peer(
    datanode_id: DatanodeId,
    meta_peer_client: &MetaPeerClientRef,
    lease_secs: u64,
) -> Result<Option<Peer>>
Expand description

look up [Peer] given [ClusterId] and DatanodeId, will only return if it’s alive under given lease_secs