mirror of
https://github.com/tailscale/tailscale.git
synced 2025-02-18 10:58:39 +00:00
![David Anderson](/assets/img/avatar_default.png)
It's currently unused, and no longer makes sense with the upcoming DNS infrastructure. Keep it in tailcfg for now, since we need protocol compat for a bit longer. Signed-off-by: David Anderson <danderson@tailscale.com>
27 lines
625 B
Go
27 lines
625 B
Go
// Copyright (c) 2020 Tailscale Inc & AUTHORS All rights reserved.
|
|
// Use of this source code is governed by a BSD-style
|
|
// license that can be found in the LICENSE file.
|
|
|
|
package dns
|
|
|
|
func newManager(mconfig ManagerConfig) managerImpl {
|
|
switch {
|
|
case isResolvedActive():
|
|
if mconfig.Cleanup {
|
|
return newNoopManager(mconfig)
|
|
} else {
|
|
return newResolvedManager(mconfig)
|
|
}
|
|
case isNMActive():
|
|
if mconfig.Cleanup {
|
|
return newNoopManager(mconfig)
|
|
} else {
|
|
return newNMManager(mconfig)
|
|
}
|
|
case isResolvconfActive():
|
|
return newResolvconfManager(mconfig)
|
|
default:
|
|
return newDirectManager(mconfig)
|
|
}
|
|
}
|