Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
feudal
feudalClient
Commits
dfce6039
Commit
dfce6039
authored
Jan 29, 2020
by
Lukas Burgey
Browse files
Adapt to url changes at the backend
parent
93ac1800
Pipeline
#66062
failed with stages
in 1 minute and 27 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
config/config.go
View file @
dfce6039
...
@@ -164,7 +164,7 @@ func (conf *Config) Sync() (err error) {
...
@@ -164,7 +164,7 @@ func (conf *Config) Sync() (err error) {
// update the services tracked by the backend
// update the services tracked by the backend
req
,
err
=
http
.
NewRequest
(
req
,
err
=
http
.
NewRequest
(
"PUT"
,
"PUT"
,
"https://"
+
conf
.
Hostname
+
"/
backend/
client
api
/config"
,
"https://"
+
conf
.
Hostname
+
"/client/config"
,
bytes
.
NewReader
(
strippedConfigBytes
),
bytes
.
NewReader
(
strippedConfigBytes
),
)
)
if
err
!=
nil
{
if
err
!=
nil
{
...
...
main.go
View file @
dfce6039
...
@@ -52,7 +52,7 @@ func deregister(conf *config.Config) {
...
@@ -52,7 +52,7 @@ func deregister(conf *config.Config) {
req
,
err
=
http
.
NewRequest
(
req
,
err
=
http
.
NewRequest
(
"PUT"
,
"PUT"
,
"https://"
+
conf
.
Hostname
+
"/
backend/
client
api
/deregister"
,
"https://"
+
conf
.
Hostname
+
"/client/deregister"
,
nil
,
nil
,
)
)
if
err
!=
nil
{
if
err
!=
nil
{
...
...
sink/script/script.go
View file @
dfce6039
...
@@ -13,8 +13,8 @@ import (
...
@@ -13,8 +13,8 @@ import (
"time"
"time"
"git.scc.kit.edu/feudal/feudalClient/config"
"git.scc.kit.edu/feudal/feudalClient/config"
"git.scc.kit.edu/feudal/feudalClient/deployments"
deps
"git.scc.kit.edu/feudal/feudalClient/deployments"
"git.scc.kit.edu/feudal/feudalScripts/v2"
scripts
"git.scc.kit.edu/feudal/feudalScripts/v2"
)
)
type
(
type
(
...
@@ -236,7 +236,7 @@ func (sink *Sink) sendReply(reply deps.Reply) (err error) {
...
@@ -236,7 +236,7 @@ func (sink *Sink) sendReply(reply deps.Reply) (err error) {
log
.
Printf
(
"Dep Response:
\n
%s"
,
taskResponse
)
log
.
Printf
(
"Dep Response:
\n
%s"
,
taskResponse
)
}
}
url
:=
fmt
.
Sprintf
(
"https://%s/
backend/
client
api
/dep-state"
,
sink
.
Config
.
Hostname
)
url
:=
fmt
.
Sprintf
(
"https://%s/client/dep-state"
,
sink
.
Config
.
Hostname
)
var
req
*
http
.
Request
var
req
*
http
.
Request
req
,
err
=
http
.
NewRequest
(
"PATCH"
,
url
,
bytes
.
NewReader
(
taskResponse
))
req
,
err
=
http
.
NewRequest
(
"PATCH"
,
url
,
bytes
.
NewReader
(
taskResponse
))
if
err
!=
nil
{
if
err
!=
nil
{
...
...
source/rest/rest.go
View file @
dfce6039
...
@@ -10,7 +10,7 @@ import (
...
@@ -10,7 +10,7 @@ import (
"time"
"time"
"git.scc.kit.edu/feudal/feudalClient/config"
"git.scc.kit.edu/feudal/feudalClient/config"
"git.scc.kit.edu/feudal/feudalClient/deployments"
deps
"git.scc.kit.edu/feudal/feudalClient/deployments"
)
)
type
(
type
(
...
@@ -35,7 +35,7 @@ func (src Source) fetchDeps(sink chan<- deps.Dep) (err error) {
...
@@ -35,7 +35,7 @@ func (src Source) fetchDeps(sink chan<- deps.Dep) (err error) {
}
}
// construct a request
// construct a request
uri
:=
"https://"
+
src
.
Config
.
Hostname
+
"/
backend/
client
api
/dep-states"
uri
:=
"https://"
+
src
.
Config
.
Hostname
+
"/client/dep-states"
req
,
err
:=
http
.
NewRequest
(
"GET"
,
uri
,
nil
)
req
,
err
:=
http
.
NewRequest
(
"GET"
,
uri
,
nil
)
if
err
!=
nil
{
if
err
!=
nil
{
err
=
fmt
.
Errorf
(
"Request creation failed: %s"
,
err
)
err
=
fmt
.
Errorf
(
"Request creation failed: %s"
,
err
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment