This commit is contained in:
Michael Lehmann
2025-02-18 21:06:52 +01:00
parent da6b2ec0ef
commit 088a15975c
13 changed files with 361 additions and 0 deletions

28
main.go Normal file
View File

@@ -0,0 +1,28 @@
package main
import (
"fmt"
"kattudden/wiz-controller/config"
"kattudden/wiz-controller/controller"
)
func main() {
config, err := config.GetConfig()
if err != nil {
fmt.Println(err)
return
}
for groupName, group := range config.Groups {
fmt.Println("Gruppe:", groupName)
for _, bulp := range group.Bulps {
fmt.Printf(" Bulp: ip: %s, port: %s\n", bulp.IP, bulp.Port)
status, err := controller.GetStatus(bulp.IP, bulp.Port)
if err != nil {
fmt.Println(err)
}
fmt.Println("status:", status.Result.State)
}
}
}