(c config.Root)
| 65 | } |
| 66 | |
| 67 | func (s *AppService) handleConfigUpdate(c config.Root) { |
| 68 | // handle the client forward listeners |
| 69 | activeServices := map[string]struct{}{} |
| 70 | for _, f := range c.Forwarders { |
| 71 | service := NewForwardService(f, s.log) |
| 72 | s.serviceManager.Add(service) |
| 73 | activeServices[service.Name()] = struct{}{} |
| 74 | } |
| 75 | |
| 76 | // TODO: TUN-1451 - tunnels |
| 77 | |
| 78 | // remove any services that are no longer active |
| 79 | for _, service := range s.serviceManager.Services() { |
| 80 | if _, ok := activeServices[service.Name()]; !ok { |
| 81 | s.serviceManager.Remove(service.Name()) |
| 82 | } |
| 83 | } |
| 84 | } |
no test coverage detected