Code Review
/
src
/
xds
/
xds-server.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Take care of ST connection lost in ST event monitor.
[src/xds/xds-server.git]
/
lib
/
apiv1
/
agent.go
diff --git
a/lib/apiv1/agent.go
b/lib/apiv1/agent.go
index
d8feb61
..
925f12b
100644
(file)
--- a/
lib/apiv1/agent.go
+++ b/
lib/apiv1/agent.go
@@
-8,9
+8,10
@@
import (
"path/filepath"
"github.com/gin-gonic/gin"
"path/filepath"
"github.com/gin-gonic/gin"
-
"github.com/iotbzh/xds-agent/lib/common
"
+
common "github.com/iotbzh/xds-common/golib
"
)
)
+// XDSAgentTarball .
type XDSAgentTarball struct {
OS string `json:"os"`
Arch string `json:"arch"`
type XDSAgentTarball struct {
OS string `json:"os"`
Arch string `json:"arch"`
@@
-18,6
+19,8
@@
type XDSAgentTarball struct {
RawVersion string `json:"raw-version"`
FileURL string `json:"fileUrl"`
}
RawVersion string `json:"raw-version"`
FileURL string `json:"fileUrl"`
}
+
+// XDSAgentInfo .
type XDSAgentInfo struct {
Tarballs []XDSAgentTarball `json:"tarballs"`
}
type XDSAgentInfo struct {
Tarballs []XDSAgentTarball `json:"tarballs"`
}
@@
-27,7
+30,7
@@
func (s *APIService) getXdsAgentInfo(c *gin.Context) {
res := XDSAgentInfo{}
tarballURL := "assets/xds-agent-tarballs"
res := XDSAgentInfo{}
tarballURL := "assets/xds-agent-tarballs"
- tarballDir := filepath.Join(s.cfg.WebAppDir, "assets", "xds-agent-tarballs")
+ tarballDir := filepath.Join(s.cfg.
FileConf.
WebAppDir, "assets", "xds-agent-tarballs")
if common.Exists(tarballDir) {
files, err := filepath.Glob(path.Join(tarballDir, "xds-agent_*.zip"))
if err != nil {
if common.Exists(tarballDir) {
files, err := filepath.Glob(path.Join(tarballDir, "xds-agent_*.zip"))
if err != nil {