fix: conflict
ci-agent / build (push) Failing after 1m45s

This commit is contained in:
d3m0k1d
2026-04-04 05:46:42 +03:00
parent ad92439770
commit c59d122e04
4 changed files with 6 additions and 1 deletions
+1
View File
@@ -8,6 +8,7 @@ import (
type AgentConfig struct {
BackendURL string `yaml:"backend_url"`
GRPCURL string `yaml:"grpc_url"`
RegistrationToken string `yaml:"registration_token"`
Label string `yaml:"label"`
CertDir string `yaml:"cert_dir"`
+3
View File
@@ -4,6 +4,7 @@ import (
"context"
"log"
"os"
"strings"
"gitea.d3m0k1d.ru/d3m0k1d/HellreigN/agent/internal/client"
"gitea.d3m0k1d.ru/d3m0k1d/HellreigN/agent/internal/commander"
@@ -63,8 +64,10 @@ func main() {
defer cancel()
cmdexe := new(commander.CommandExecutor)
ccli := client.New(cmdexe, cfg.Label, cfg.Label)
// Use grpc_url for gRPC connection, strip scheme if present
grpcAddr := cfg.GRPCURL
if grpcAddr == "" {
// Fallback: derive from backend_url by stripping scheme
grpcAddr = cfg.BackendURL
}
grpcAddr = strings.TrimPrefix(grpcAddr, "http://")