more work done

This commit is contained in:
ston1th 2021-03-06 16:51:36 +01:00
commit 6fda229a8e
23 changed files with 384 additions and 177 deletions

View file

@ -6,8 +6,8 @@ import (
"fmt"
"time"
"git.giftfish.de/ston1th/vipman/pkg/config"
"git.giftfish.de/ston1th/vipman/pkg/util"
"git.giftfish.de/ston1th/haproxy-lb/pkg/config"
"git.giftfish.de/ston1th/haproxy-lb/pkg/util"
"github.com/coreos/etcd/clientv3"
"go.uber.org/zap"
"go.uber.org/zap/zapcore"
@ -198,6 +198,11 @@ func (c *Cluster) Stepdown() {
}
}
func (c *Cluster) Fatal(err error, msg string) {
c.Error(err, "a fatal error occurred", "message", msg)
c.Stop()
}
func (c *Cluster) Stop() {
if !c.session {
c.cancelSession()