From 9ca0fbe3a65387c62ba5c57a79a9892170f655b8 Mon Sep 17 00:00:00 2001 From: stinkyPeach <21327625+StinkyPeach@users.noreply.github.com> Date: Tue, 27 Dec 2022 13:12:57 +0800 Subject: [PATCH] fix the request param of AgentRegister --- model/config.go | 1 + service/engine.go | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/model/config.go b/model/config.go index a892b43..5c777e1 100644 --- a/model/config.go +++ b/model/config.go @@ -6,4 +6,5 @@ type Config struct { DongtaiGoProjectName string `yaml:"DongtaiGoProjectName"` DongtaiGoProjectVersion string `yaml:"DongtaiGoProjectVersion"` DongtaiGoProjectCreate bool `yaml:"DongtaiGoProjectCreate"` + DongtaiGoAgentToken string `yaml:"DongtaiGoAgentToken"` } diff --git a/service/engine.go b/service/engine.go index c3cfe4e..dff5e3d 100644 --- a/service/engine.go +++ b/service/engine.go @@ -86,7 +86,7 @@ func AgentRegister() (err error) { if global.Config.DongtaiGoProjectVersion != "" { projectName = global.Config.DongtaiGoProjectName } - name := OS + "-" + hostname + "-" + version + name := OS + "-" + hostname + "-" + version + "-" + global.Config.DongtaiGoAgentToken interfaces, err := net.Interfaces() if err != nil { return