27 lines
555 B
Go
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"})
|
|
}
|