code: func (l *State) RemoveProxy(id string) (*ManagedProxy, error) {
  	l.Lock()
  	defer l.Unlock()
  
  	p := l.managedProxies[id]
  	if p == nil {
  		return nil, fmt.Errorf("Proxy %s does not exist", id)
  	}
  	delete(l.managedProxies, id)
  
  	// Notify watchers of the existing proxy config that it's changed.
  	close(p.WatchCh)
  
  	// Notify
  	for ch := range l.managedProxyHandlers {
  		// Do not block
  		select {
  		case ch <- struct{}{}:
  		default:
  		}
  	}
  
  	// No need to trigger sync as proxy state is local only.
  	return p, nil
  }
docs: // RemoveProxy is used to remove a proxy entry from the local state.
  // This returns the proxy that was removed.