From a92e73892cc393249121c100146e47a3a03ce602 Mon Sep 17 00:00:00 2001 From: mr Date: Wed, 28 Aug 2024 14:16:51 +0200 Subject: [PATCH] new oclib --- controllers/version.go | 2 +- go.mod | 4 ++-- go.sum | 4 ++++ main.go | 2 +- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/controllers/version.go b/controllers/version.go index 2bf7bc7..4e50e5f 100644 --- a/controllers/version.go +++ b/controllers/version.go @@ -29,7 +29,7 @@ func (c *VersionController) Status() { state, code, err := api.GetState() if state == tools.ALIVE { - state, _, err = api.CheckRemoteAPIs([]string{}) + state, _, err = api.CheckRemoteAPIs(map[string]string{}) } if err != nil { errStr = err.Error() diff --git a/go.mod b/go.mod index 7cbd06b..347e1ea 100644 --- a/go.mod +++ b/go.mod @@ -11,7 +11,7 @@ require ( ) require ( - cloud.o-forge.io/core/oc-lib v0.0.0-20240821093044-f64563c9ff06 // indirect + cloud.o-forge.io/core/oc-lib v0.0.0-20240828114159-ede91cde4583 // indirect filippo.io/edwards25519 v1.1.0 // indirect github.com/beego/bee/v2 v2.1.0 // indirect github.com/beorn7/perks v1.0.1 // indirect @@ -90,7 +90,7 @@ require ( golang.org/x/mod v0.19.0 // indirect golang.org/x/net v0.28.0 // indirect golang.org/x/sync v0.8.0 // indirect - golang.org/x/sys v0.23.0 // indirect + golang.org/x/sys v0.24.0 // indirect golang.org/x/text v0.17.0 // indirect golang.org/x/tools v0.23.0 // indirect google.golang.org/protobuf v1.34.2 // indirect diff --git a/go.sum b/go.sum index c0171ee..29efba1 100644 --- a/go.sum +++ b/go.sum @@ -156,6 +156,8 @@ cloud.o-forge.io/core/oc-lib v0.0.0-20240808150044-2ae15c720ab6 h1:uePDhEWN1kcF3 cloud.o-forge.io/core/oc-lib v0.0.0-20240808150044-2ae15c720ab6/go.mod h1:V5EL+NV2s9P1/BcFm3/icfLeBYVVMLl1Z0F0eecJZGo= cloud.o-forge.io/core/oc-lib v0.0.0-20240821093044-f64563c9ff06 h1:sYveE1C/0mpSr+ZmOYxuZ3fTWID7mr5hPiq0jQenv3Q= cloud.o-forge.io/core/oc-lib v0.0.0-20240821093044-f64563c9ff06/go.mod h1:1hhYh5QWAbYw9cKplQ0ZD9PMgU8t6gPqiYF8sldv1HU= +cloud.o-forge.io/core/oc-lib v0.0.0-20240828114159-ede91cde4583 h1:5DVFZLJ4tySspQwk0H1HRR+arWSRsYsujP4N8zxvy2Q= +cloud.o-forge.io/core/oc-lib v0.0.0-20240828114159-ede91cde4583/go.mod h1:1hhYh5QWAbYw9cKplQ0ZD9PMgU8t6gPqiYF8sldv1HU= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA= filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4= @@ -689,6 +691,8 @@ golang.org/x/sys v0.22.0 h1:RI27ohtqKCnwULzJLqkv897zojh5/DwS/ENaMzUOaWI= golang.org/x/sys v0.22.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.23.0 h1:YfKFowiIMvtgl1UERQoTPPToxltDeZfbj4H7dVUCwmM= golang.org/x/sys v0.23.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.24.0 h1:Twjiwq9dn6R1fQcyiK+wQyHWfaz/BJB+YIpzU/Cv3Xg= +golang.org/x/sys v0.24.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= diff --git a/main.go b/main.go index e224f61..f52f545 100644 --- a/main.go +++ b/main.go @@ -29,7 +29,7 @@ func main() { o.GetStringDefault("MONGO_DATABASE", "DC_myDC"), "", ) - oclib.Init("oc-scheduler") + oclib.Init("oc-scheduler", o.GetStringDefault("HOSTNAME", "localhost"), o.GetStringDefault("PORT", "8090")) // Normal beego init //if beego.BConfig.RunMode == "dev" { beego.BConfig.WebConfig.DirectoryIndex = true