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

Method registerPoolRoutes

server/routes.go:280–292  ·  view source on GitHub ↗

registerPoolRoutes registers pool-related routes

(rg *gin.RouterGroup)

Source from the content-addressed store, hash-verified

278
279// registerPoolRoutes registers pool-related routes
280func (s *Server) registerPoolRoutes(rg *gin.RouterGroup) {
281 h := handlers.NewPoolHandler(s.store, s.deps.AgentDeps)
282
283 pool := rg.Group("/pool")
284 {
285 pool.POST("/agents", h.CreateAgent)
286 pool.GET("/agents", h.ListAgents)
287 pool.GET("/agents/:id", h.GetAgent)
288 pool.POST("/agents/:id/resume", h.ResumeAgent)
289 pool.DELETE("/agents/:id", h.RemoveAgent)
290 pool.GET("/stats", h.GetStats)
291 }
292}
293
294// registerRoomRoutes registers room-related routes
295func (s *Server) registerRoomRoutes(rg *gin.RouterGroup) {

Callers 1

registerSystemRoutesMethod · 0.95

Calls 1

NewPoolHandlerFunction · 0.92

Tested by

no test coverage detected