Registry / Framework

framework · v0.1.0
Martin
Decide whether another RPC attempt fits the remaining end-to-end deadline.
Use Martin
use vendor::martin::martin;
Run the example
nest demo martin@0.1.0
blyxc native-run martin-demo/main.blyx
Example source and expected output
use vendor::martin::martin;
fn main() {
let budget = 100.0;
let stages = [20, 30];
let wait = 10.0;
let minimum = 35.0;
let status = 14.0;
let idempotent = 1.0;
let attempts = 1.0;
let limit = 3.0;
let result = martin_retry(budget, stages, wait, minimum, status, idempotent, attempts, limit);
if len(result) == 0 { println!("invalid"); return; }
let mut i = 0;
while i < len(result) {
println!(at(result, i));
i += 1;
}
}
Expected output
1
40
2
Published versions
| Version | Package | Source commit | SHA-256 |
|---|---|---|---|
| 0.1.0 | Download ZIP | a2cf0c721a | 594234b94ac97b1c7e1fc4f2e8f5606bd5b14114327ca23914d40f4bf014d7d1 |