package compute
import "cloud.google.com/go/auth/internal/compute"
Index ¶
Functions ¶
func OnComputeEngine ¶
func OnComputeEngine() bool
OnComputeEngine returns whether the client is running on GCE.
This is a copy of the gRPC internal googlecloud.OnGCE() func at: https://github.com/grpc/grpc-go/blob/master/internal/googlecloud/googlecloud.go The functionality is similar to the metadata.OnGCE() func at: https://github.com/xmenxk/google-cloud-go/blob/main/compute/metadata/metadata.go
The difference is that OnComputeEngine() does not perform HTTP or DNS check on the metadata server. In particular, OnComputeEngine() will return false on Serverless.
Source Files ¶
compute.go manufacturer.go
- Version
- v0.11.0
- Published
- Nov 21, 2024
- Platform
- darwin/amd64
- Imports
- 4 packages
- Last checked
- 18 seconds ago –
Tools for package owners.