Actually use cache
This commit is contained in:
@@ -87,12 +87,12 @@ type FactoryDetails struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type Route struct {
|
type Route struct {
|
||||||
ContentTypeID int `json:"content_type_id"`
|
ContentTypeID int `json:"content_type_id"`
|
||||||
DestinationPinID int `json:"destination_pin_id"`
|
DestinationPinID int `json:"destination_pin_id"`
|
||||||
Quantity int `json:"quantity"`
|
Quantity float64 `json:"quantity"`
|
||||||
RouteID int `json:"route_id"`
|
RouteID int `json:"route_id"`
|
||||||
SourcePinID int `json:"source_pin_id"`
|
SourcePinID int `json:"source_pin_id"`
|
||||||
Waypoints []int `json:"waypoints"`
|
Waypoints []int `json:"waypoints"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// ESIInterface defines the contract for ESI API interactions
|
// ESIInterface defines the contract for ESI API interactions
|
||||||
|
|||||||
7
main.go
7
main.go
@@ -64,11 +64,12 @@ func main() {
|
|||||||
// Configure SSO to use existing fasthttp router
|
// Configure SSO to use existing fasthttp router
|
||||||
sso.SetRouter(r)
|
sso.SetRouter(r)
|
||||||
|
|
||||||
// Create ESI client
|
// Create ESI client with caching
|
||||||
esiClient := esi.NewDirectESI()
|
directESI := esi.NewDirectESI()
|
||||||
|
cachedESI := esi.NewCachedESI(directESI, database.Cache())
|
||||||
|
|
||||||
// Create route handler with dependencies
|
// Create route handler with dependencies
|
||||||
routeHandler := routes.NewRouteHandler(sso, webhook, esiClient)
|
routeHandler := routes.NewRouteHandler(sso, webhook, cachedESI)
|
||||||
routeHandler.SetupRoutes(r)
|
routeHandler.SetupRoutes(r)
|
||||||
|
|
||||||
logger.Info("Starting web server on 0.0.0.0:%s", options.GlobalOptions.Port)
|
logger.Info("Starting web server on 0.0.0.0:%s", options.GlobalOptions.Port)
|
||||||
|
|||||||
Reference in New Issue
Block a user