oc-schedulerd/main.go
2024-07-03 10:21:17 +02:00

38 lines
657 B
Go

package main
import (
"fmt"
"os"
"time"
conf "oc-scheduler/conf"
"github.com/rs/zerolog"
)
var log zerolog.Logger
func main() {
output := zerolog.ConsoleWriter{Out: os.Stdout, TimeFormat: time.RFC3339}
log = zerolog.New(output).With().Timestamp().Logger()
app_conf := conf.GetConfig()
apiurl := app_conf.OcCatalogUrl
var g Graph
list, err := g.GetGraphList(apiurl)
if err != nil {
log.Fatal().Msg("Failed to get the workspaces list, check api url and that api server is up : " + apiurl)
}
for workspace, _ := range list {
println(workspace)
}
g.LoadFrom(list["test-alpr"])
g.ExportToArgo("test-alpr")
fmt.Print("stop")
}