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

Function NewPoolHandler

server/handlers/pool.go:22–34  ·  view source on GitHub ↗

NewPoolHandler creates a new PoolHandler

(st store.Store, deps *agent.Dependencies)

Source from the content-addressed store, hash-verified

20
21// NewPoolHandler creates a new PoolHandler
22func NewPoolHandler(st store.Store, deps *agent.Dependencies) *PoolHandler {
23 // Create pool with dependencies
24 pool := core.NewPool(&core.PoolOptions{
25 Dependencies: deps,
26 MaxAgents: 100,
27 })
28
29 return &PoolHandler{
30 store: &st,
31 deps: deps,
32 pool: pool,
33 }
34}
35
36// CreateAgent creates a new agent in the pool
37func (h *PoolHandler) CreateAgent(c *gin.Context) {

Callers 1

registerPoolRoutesMethod · 0.92

Calls 1

NewPoolFunction · 0.92

Tested by

no test coverage detected