mirror of
https://github.com/kubeshark/kubeshark.git
synced 2025-09-10 23:10:32 +00:00
TRA-4263 extensibility refactor (#770)
* Refactor routers * refactor extension loading * refactor server creation code * Update main.go
This commit is contained in:
@@ -6,9 +6,15 @@ import (
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
var (
|
||||
MetadataGetVersionHandler = controllers.GetVersion
|
||||
)
|
||||
|
||||
// MetadataRoutes defines the group of metadata routes.
|
||||
func MetadataRoutes(app *gin.Engine) {
|
||||
func MetadataRoutes(app *gin.Engine) *gin.RouterGroup {
|
||||
routeGroup := app.Group("/metadata")
|
||||
|
||||
routeGroup.GET("/version", controllers.GetVersion)
|
||||
routeGroup.GET("/version", func(c *gin.Context) { MetadataGetVersionHandler(c) })
|
||||
|
||||
return routeGroup
|
||||
}
|
||||
|
Reference in New Issue
Block a user