(
name: &str,
status: WaveKvNodeStatus,
get_peer_last_seen: &impl Fn(u32) -> Vec<(u32, u64)>,
)
| 698 | } |
| 699 | |
| 700 | fn build_store_status( |
| 701 | name: &str, |
| 702 | status: WaveKvNodeStatus, |
| 703 | get_peer_last_seen: &impl Fn(u32) -> Vec<(u32, u64)>, |
| 704 | ) -> StoreSyncStatus { |
| 705 | StoreSyncStatus { |
| 706 | name: name.to_string(), |
| 707 | node_id: status.id, |
| 708 | n_keys: status.n_kvs as u64, |
| 709 | next_seq: status.next_seq, |
| 710 | dirty: status.dirty, |
| 711 | wal_enabled: status.wal, |
| 712 | peers: status |
| 713 | .peers |
| 714 | .into_iter() |
| 715 | .map(|p| { |
| 716 | let last_seen = get_peer_last_seen(p.id) |
| 717 | .into_iter() |
| 718 | .map(|(node_id, timestamp)| LastSeenEntry { node_id, timestamp }) |
| 719 | .collect(); |
| 720 | ProtoPeerSyncStatus { |
| 721 | id: p.id, |
| 722 | local_ack: p.ack, |
| 723 | peer_ack: p.pack, |
| 724 | buffered_logs: p.logs as u64, |
| 725 | last_seen, |
| 726 | } |
| 727 | }) |
| 728 | .collect(), |
| 729 | } |
| 730 | } |
| 731 | |
| 732 | impl RpcCall<Proxy> for AdminRpcHandler { |
| 733 | type PrpcService = AdminServer<Self>; |
no test coverage detected