(
kv_store: KvStore,
store_path: &'static str,
tls_config: &HttpsClientConfig,
)
| 38 | |
| 39 | impl HttpSyncNetwork { |
| 40 | pub fn new( |
| 41 | kv_store: KvStore, |
| 42 | store_path: &'static str, |
| 43 | tls_config: &HttpsClientConfig, |
| 44 | ) -> Result<Self> { |
| 45 | let client = HttpsClient::new(tls_config)?; |
| 46 | let my_uuid = kv_store |
| 47 | .get_peer_uuid(kv_store.my_node_id) |
| 48 | .context("failed to get my UUID")?; |
| 49 | Ok(Self { |
| 50 | client, |
| 51 | kv_store, |
| 52 | my_uuid, |
| 53 | store_path, |
| 54 | }) |
| 55 | } |
| 56 | |
| 57 | /// Get peer URL from persistent node |
| 58 | fn get_peer_url(&self, peer_id: NodeId) -> Option<String> { |
nothing calls this directly
no test coverage detected