line endings change fix, misc

This commit is contained in:
2024-12-16 21:04:05 -06:00
parent 342918fa2f
commit 0659047a9b
49 changed files with 44 additions and 1 deletions

18
api/latency.go Normal file
View File

@@ -0,0 +1,18 @@
package api
import probing "github.com/prometheus-community/pro-bing"
type PingResult struct {
Ip string
Latency float64
}
func GetLatency(ip string) (float64, error) {
pinger, err := probing.NewPinger(ip)
if err != nil {
return 0, err
}
pinger
return 0, nil
}