feat: implement Yandex /search method for on-demand edge expansion (Task 2)
- Add SearchRoutes method to yandex client for on-demand station pair searches
- Implement hub expansion via on-demand /search calls in lazy graph expansion
- Integrate cache key generation for search results (search:{from}:{to}:{date})
- Update expandFromStation and expandFromCityHub to use Yandex API
- Add NewGraphWithoutYandex constructor for testability
- Add tests for on-demand search integration and cache TTL policies
This commit is contained in:
@@ -14,8 +14,8 @@ import (
|
||||
|
||||
func main() {
|
||||
redisClient := initRedis()
|
||||
router := routing.NewGraph()
|
||||
yandexClient := yandex.NewClient("default-key")
|
||||
router := routing.NewGraph(yandexClient)
|
||||
|
||||
handlerCtx := NewHandlerContext(redisClient, router, yandexClient)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user