1 package main 2 3 import ( 4 "fmt" 5 "golang.conradwood.net/apis/common" 6 "golang.conradwood.net/go-easyops/authremote" 7 "time" 8 ) 9 10 func SimplePing() { 11 initClient() 12 xloop: 13 ctx := authremote.Context() 14 _, err := cl.SimplePing(ctx, &common.Void{}) 15 if err != nil { 16 fmt.Printf("failed to ping: %s\n", err) 17 } 18 if *loop { 19 time.Sleep(time.Duration(300) * time.Millisecond) 20 goto xloop 21 } 22 23 } 24