actual hostname
This commit is contained in:
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
milkwatch-server
|
||||||
5
main.go
5
main.go
@@ -13,6 +13,8 @@ import (
|
|||||||
const yourDomain string = "sandbox403bedf0d09d4e539131fabf0ab7c11f.mailgun.org" // e.g. mg.yourcompany.com
|
const yourDomain string = "sandbox403bedf0d09d4e539131fabf0ab7c11f.mailgun.org" // e.g. mg.yourcompany.com
|
||||||
const privateAPIKey string = "key-2b58bc1193c549df83d8d5ed54e1c982"
|
const privateAPIKey string = "key-2b58bc1193c549df83d8d5ed54e1c982"
|
||||||
|
|
||||||
|
const host = "rodberrypi"
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
for {
|
for {
|
||||||
log.Println("Checking Fridge")
|
log.Println("Checking Fridge")
|
||||||
@@ -27,8 +29,7 @@ func main() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func endPointAlive() bool {
|
func endPointAlive() bool {
|
||||||
|
res, err := http.Get("http://"+host+":2122/heartbeat")
|
||||||
res, err := http.Get("http://localhost:2122/heartbeat")
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Println(err)
|
log.Println(err)
|
||||||
return false
|
return false
|
||||||
|
|||||||
Reference in New Issue
Block a user