MCPcopy Create free account
hub / github.com/astercloud/aster / registerSystemRoutes

Method registerSystemRoutes

server/routes.go:248–277  ·  view source on GitHub ↗

registerSystemRoutes registers all system-related routes

(rg *gin.RouterGroup)

Source from the content-addressed store, hash-verified

246
247// registerSystemRoutes registers all system-related routes
248func (s *Server) registerSystemRoutes(rg *gin.RouterGroup) {
249 // Create system handler
250 h := handlers.NewSystemHandler(s.store)
251
252 system := rg.Group("/system")
253 {
254 // Configuration management
255 config := system.Group("/config")
256 {
257 config.GET("", h.ListConfig)
258 config.GET("/:key", h.GetConfig)
259 config.PUT("/:key", h.UpdateConfig)
260 config.DELETE("/:key", h.DeleteConfig)
261 }
262
263 // System operations
264 system.GET("/info", h.GetInfo)
265 system.GET("/health", h.GetHealth)
266 system.GET("/stats", h.GetStats)
267 system.POST("/reload", h.Reload)
268 system.POST("/gc", h.RunGC)
269 system.POST("/backup", h.Backup)
270 }
271
272 // Pool routes
273 s.registerPoolRoutes(rg)
274
275 // Room routes
276 s.registerRoomRoutes(rg)
277}
278
279// registerPoolRoutes registers pool-related routes
280func (s *Server) registerPoolRoutes(rg *gin.RouterGroup) {

Callers 1

setupRoutesMethod · 0.95

Calls 3

registerPoolRoutesMethod · 0.95
registerRoomRoutesMethod · 0.95
NewSystemHandlerFunction · 0.92

Tested by

no test coverage detected