Update
This commit is contained in:
7
vendor/tailscale.com/util/cloudenv/cloudenv.go
generated
vendored
7
vendor/tailscale.com/util/cloudenv/cloudenv.go
generated
vendored
@@ -16,6 +16,7 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"tailscale.com/feature/buildfeatures"
|
||||
"tailscale.com/syncs"
|
||||
"tailscale.com/types/lazy"
|
||||
)
|
||||
@@ -51,6 +52,9 @@ const (
|
||||
// ResolverIP returns the cloud host's recursive DNS server or the
|
||||
// empty string if not available.
|
||||
func (c Cloud) ResolverIP() string {
|
||||
if !buildfeatures.HasCloud {
|
||||
return ""
|
||||
}
|
||||
switch c {
|
||||
case GCP:
|
||||
return GoogleMetadataAndDNSIP
|
||||
@@ -92,6 +96,9 @@ var cloudAtomic syncs.AtomicValue[Cloud]
|
||||
|
||||
// Get returns the current cloud, or the empty string if unknown.
|
||||
func Get() Cloud {
|
||||
if !buildfeatures.HasCloud {
|
||||
return ""
|
||||
}
|
||||
if c, ok := cloudAtomic.LoadOk(); ok {
|
||||
return c
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user