diff options
Diffstat (limited to 'send.go')
| -rw-r--r-- | send.go | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -12,14 +12,14 @@ import ( func pingStatus() error { var url string - url = me.urlbase + "/status?hostname=" + me.machine.Hostname - msg, err := me.machine.Packages.Marshal() + url = me.urlbase + "/status?hostname=" + me.forge.Machine.Hostname + msg, err := me.forge.Machine.Packages.Marshal() if err != nil { log.Info("proto.Marshal() failed:", err) return err } log.Info("proto Marshal len =", len(msg)) - body, err := httpPost(url, msg) + body, err := me.forge.HttpPost(url, msg) if err != nil { log.Info("httpPost() failed:", err) return err @@ -41,12 +41,12 @@ func pingStatus() error { func sendMachine(s string) error { var url string url = me.urlbase + "/machine" - msg, err := me.machine.Marshal() + msg, err := me.forge.Machine.Marshal() if err != nil { log.Info("proto.Marshal() failed:", err) return err } - body, err := httpPost(url, msg) + body, err := me.forge.HttpPost(url, msg) if err != nil { log.Info("httpPost() failed: url", url) log.Info("httpPost() failed:", err) @@ -69,7 +69,7 @@ func sendMachine(s string) error { os.Exit(0) } else { log.Info(me.urlbase, "is maybe not working GOT:", line) - log.Info(me.urlbase, "fail count", me.failcount, "from hostname", me.machine.Hostname) + log.Info(me.urlbase, "fail count", me.failcount, "from hostname", me.forge.Machine.Hostname) } } return nil |
