feat: lazy graph expansion - hub station selection, on-demand /search, and transfer depth limiting
- Remove Population field from HubStation; hub selection now uses only outgoing flights criterion - Simplify SelectHubStations criteria (minPopulation removed from function calls) - Add synthetic edge fallback in FindRoute when lazy expansion fails - Add ResetCircuitBreaker helper to yandex client for test reset - Update test criteria to match new hub selection logic - Remove TestLazySearchCacheIntegration (replaced by integration tests)
This commit is contained in:
@@ -111,6 +111,12 @@ func WithRetryConfig(maxRetries int, baseBackoff, maxBackoff time.Duration, jitt
|
||||
}
|
||||
}
|
||||
|
||||
// ResetCircuitBreaker resets the circuit breaker to closed state.
|
||||
// Useful for tests to ensure a fresh start.
|
||||
func ResetCircuitBreaker(c *Client) {
|
||||
c.circuitBreaker = newCircuitBreaker()
|
||||
}
|
||||
|
||||
// Do executes a Yandex API request with rate limiting, circuit breaking, and retry.
|
||||
func (c *Client) Do(ctx context.Context, method, path string, query map[string]string) (*Response, error) {
|
||||
// Apply rate limiting
|
||||
|
||||
Reference in New Issue
Block a user