Files
HellreigN/backend/internal/handlers/agents.go
T
d3m0k1d 27e82f80f1
ci-agent / build (push) Failing after 22s
docs: add docs for agents list
2026-04-03 23:01:59 +03:00

27 lines
555 B
Go

package handlers
import (
"github.com/gin-gonic/gin"
"net/http"
)
type AgentsGroup struct {
*Handlers
}
type AgentInfo struct {
Token string `json:"token"`
Label string `json:"label"`
Services []string `json:"services"`
}
// @Summary Get connected agents
// @Description Returns a list of all agents currently connected via gRPC streaming
// @Tags agents
// @Produce json
// @Success 200 {array} AgentInfo
// @Router /agents [get]
func (ag *AgentsGroup) List(c *gin.Context) {
c.JSON(http.StatusOK, gin.H{"message": "Agents list"})
}