Add envoy proxy

This commit is contained in:
Eden Kirin
2024-01-14 12:45:30 +01:00
parent 304ce0678a
commit 018fd310cb
5 changed files with 896 additions and 693 deletions

View File

@ -60,9 +60,12 @@ func initRouter(dbConn *gorm.DB) *gin.Engine {
gin.SetMode(gin.ReleaseMode)
router := gin.Default()
router.GET("/ping", handlePing)
router.GET("/", handleGetMachines(dbConn))
router.GET("/:machineId", handleGetMachine(dbConn))
routes := router.Group("/machines")
{
routes.GET("/ping", handlePing)
routes.GET("", handleGetMachines(dbConn))
routes.GET("/:machineId", handleGetMachine(dbConn))
}
return router
}