first compilable version

This commit is contained in:
ston1th 2021-03-07 12:24:34 +01:00
commit fc1912bfa9
10 changed files with 188 additions and 88 deletions

View file

@ -6,6 +6,7 @@ import (
"os/signal"
"syscall"
"git.giftfish.de/ston1th/haproxy-lb/pkg/api"
"git.giftfish.de/ston1th/haproxy-lb/pkg/cluster"
"git.giftfish.de/ston1th/haproxy-lb/pkg/config"
"git.giftfish.de/ston1th/haproxy-lb/pkg/controller"
@ -41,7 +42,9 @@ func main() {
log.Info("creating cluster", "mode", "etcd")
c = etcd.NewCluster(klogr.New().WithName("etcd"))
}
callbacks, err := controller.NewVIPController(cfg)
srv := api.NewServer(cfg, log.WithName("api"))
callbacks, err := controller.NewLBController(cfg, srv, log.WithName("vip-controller"))
if err != nil {
klog.Fatalf("init failed: %s", err)
}