Fix dockerfile

This commit is contained in:
Mayuresh Gaitonde
2021-05-13 23:54:52 -07:00
parent 5821c01a7b
commit 82152d030d
3 changed files with 13 additions and 7 deletions

View File

@@ -71,6 +71,11 @@ func (a *App) Equal(other *App) bool {
return a.Name == other.Name && a.Vip.Net.String() == other.Vip.Net.String()
}
func (a *App) String() string {
return fmt.Sprintf("Name: %s, Vip: %s, VipConf: %v, Monitors: %v, Nats: %v, Source: %s",
a.Name, a.Vip.Net.String(), a.VipConfig, a.Monitors, a.Nats, a.Source)
}
func NewApp(appName, vip string, vipConfig config.VipConfig, monitors []string, nats []string, source string) (*App, error) {
if appName == "" {
return nil, fmt.Errorf("Invalid app name")

View File

@@ -168,7 +168,7 @@ func (m *MonitorMgr) Add(app *App) {
appMon := &appMon{app: app, done: make(chan bool)}
m.monitors[app.Name] = appMon
go m.runLoop(appMon)
glog.Infof("Registered a new app: %v", app)
glog.Infof("Registered a new app: %v", app.String())
}
// Remove removes an app from monitor manager, stops BGP