func (c *Configurator) upsertHost(host *Host) error { if c.a.GetHostRouter().GetRouter(host.Name) != nil { return nil } router := pathroute.NewPathRouter() c.a.GetHostRouter().SetRouter(host.Name, router) log.Infof("Added %s", host) return nil }
func (s *Service) addHost(host *Host) error { router := pathroute.NewPathRouter() return s.router.SetRouter(host.Name, router) }