Registry / cloud / go-compute-metadata

go-compute-metadata

JSON →
library0.9.0gogounverified

Package metadata provides access to Google Compute Engine (GCE) metadata and VM instance information.

go get cloud.google.com/go/compute/metadata
INSTALL
IMPORT
SIG · GO-COMPUTE-METADAT
G
go-compute-metadata
cloudgov0.9.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

metadata
cloud.google.com/go/compute/metadata

Retrieve the GCE project ID from metadata server

package main import ( "fmt" "cloud.google.com/go/compute/metadata" ) func main() { projectID, err := metadata.ProjectID() if err != nil { panic(err) } fmt.Println(projectID) }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
0.9.0latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
6 hits · last 30 days
node
6
Resources
go-compute-metadata — go get go-compute-metadata · libregistry