@peerbit/native-backbone 0.2.9 → 0.2.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -391,6 +391,36 @@ impl NativePeerbitBackbone {
391
391
  .full_replica_candidates_for(min_replicas, self_hash)
392
392
  }
393
393
 
394
+ #[allow(clippy::too_many_arguments)]
395
+ pub fn get_routing_full_replica_leaders(
396
+ &self,
397
+ replicas: usize,
398
+ role_age_ms: f64,
399
+ now: String,
400
+ peer_filter: JsValue,
401
+ expand_peer_filter: bool,
402
+ self_hash: String,
403
+ include_self: bool,
404
+ full_replica_fallback: bool,
405
+ include_strict_full_replica: bool,
406
+ ) -> Result<JsValue, JsValue> {
407
+ let leaders = self
408
+ .shared_log
409
+ .plan_routing_full_replica_leaders_core(
410
+ replicas,
411
+ role_age_ms,
412
+ &now,
413
+ peer_filter,
414
+ expand_peer_filter,
415
+ &self_hash,
416
+ include_self,
417
+ full_replica_fallback,
418
+ include_strict_full_replica,
419
+ )
420
+ .map_err(JsValue::from)?;
421
+ Ok(leader_samples_to_optional_rows(&leaders))
422
+ }
423
+
394
424
  #[allow(clippy::too_many_arguments)]
395
425
  pub fn put_range(
396
426
  &mut self,