fix: clickhouse logs and reg agents
ci-agent / build (push) Failing after 9m40s

This commit is contained in:
d3m0k1d
2026-04-04 15:30:05 +03:00
parent 477dd94227
commit 7e54d62170
13 changed files with 637 additions and 443 deletions
+6
View File
@@ -33,6 +33,7 @@ type InsertLogRequest struct {
// @Produce json
// @Param body body InsertLogRequest true "Log entry"
// @Success 201 {object} map[string]string
// @Security Bearer
// @Router /logs [post]
func (lh *LogHandlers) Insert(c *gin.Context) {
var req InsertLogRequest
@@ -72,6 +73,7 @@ type InsertLogsRequest struct {
// @Produce json
// @Param body body InsertLogsRequest true "Log entries"
// @Success 201 {object} map[string]string
// @Security Bearer
// @Router /logs/batch [post]
func (lh *LogHandlers) InsertBatch(c *gin.Context) {
var req InsertLogsRequest
@@ -124,6 +126,7 @@ type SearchLogsRequest struct {
// @Param limit query int false "Limit results" default(100)
// @Param offset query int false "Offset results" default(0)
// @Success 200 {array} storage.LogEntry
// @Security Bearer
// @Router /logs [get]
func (lh *LogHandlers) Search(c *gin.Context) {
var req SearchLogsRequest
@@ -170,6 +173,7 @@ func (lh *LogHandlers) Search(c *gin.Context) {
// @Tags logs
// @Produce json
// @Success 200 {array} string
// @Security Bearer
// @Router /logs/services [get]
func (lh *LogHandlers) GetServices(c *gin.Context) {
services, err := lh.LogRepo.GetDistinctServices(c.Request.Context())
@@ -190,6 +194,7 @@ func (lh *LogHandlers) GetServices(c *gin.Context) {
// @Tags logs
// @Produce json
// @Success 200 {array} string
// @Security Bearer
// @Router /logs/agents [get]
func (lh *LogHandlers) GetAgents(c *gin.Context) {
agents, err := lh.LogRepo.GetDistinctAgents(c.Request.Context())
@@ -210,6 +215,7 @@ func (lh *LogHandlers) GetAgents(c *gin.Context) {
// @Tags logs
// @Produce json
// @Success 200 {array} string
// @Security Bearer
// @Router /logs/levels [get]
func (lh *LogHandlers) GetLevels(c *gin.Context) {
levels, err := lh.LogRepo.GetDistinctLevels(c.Request.Context())