compute

package
v0.11.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 21, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

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.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL