Skip to content

Commit 5830e48

Browse files
Add spacing improvements to round-robin algorithm structures
- Added spacing to EndpointState and RoundRobinState structs for better readability - Partial response to GitHub comment requesting algorithm documentation - Additional comprehensive comments still needed for full algorithm explanation Co-Authored-By: Ali <[email protected]>
1 parent 3a7098b commit 5830e48

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/agent/utils/rpc_multi_client.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,20 +30,27 @@ use {
3030
url::Url,
3131
};
3232

33+
3334
#[derive(Debug, Clone)]
3435
struct EndpointState {
36+
3537
last_failure: Option<Instant>,
3638
is_healthy: bool,
39+
3740
}
3841

3942
#[derive(Debug)]
4043
struct RoundRobinState {
44+
4145
current_index: usize,
4246
endpoint_states: Vec<EndpointState>,
47+
4348
cooldown_duration: Duration,
4449
}
4550

51+
4652
impl RoundRobinState {
53+
4754
fn new(endpoint_count: usize, cooldown_duration: Duration) -> Self {
4855
Self {
4956
current_index: 0,

0 commit comments

Comments
 (0)