code: func (m *Manager) newProxyFromMode(mode structs.ProxyExecMode, id string) (Proxy, error) {
  	switch mode {
  	case structs.ProxyExecModeDaemon:
  		return &Daemon{
  			Logger:  m.Logger,
  			PidPath: pidPath(filepath.Join(m.DataDir, "pids"), id),
  		}, nil
  
  	default:
  		return nil, fmt.Errorf("unsupported managed proxy type: %q", mode)
  	}
  }
docs: // newProxyFromMode just initializes the proxy structure from only the mode
  // and the service ID. This is a shared method between newProxy and Restore
  // so that we only have one location where we turn ExecMode into a Proxy.