Expand description

This library provides access to GCE metadata service.

Example

use gcemeta::*;

println!("on_gce = {:?}", on_gce());
println!("project_id = {:?}", project_id());

Structs

Represents errors that can occur during handling metadata service.

Enums

Represents the details of the Error

Functions

Get the instance’s primary external (public) IP address.

Get value from the metadata service.

Get the instance’s hostname.

Get the value of the provided VM instance attribute.

Get the list of user-defined attributes, assigned when initially creating a GCE VM instance.

Get the current VM’s numeric instance ID.

Get the current VM’s instance ID string.

Get the list of user-defined instance tags, assigned when initially creating a GCE instance.

Get the instance’s primary internal IP address.

Get the current instance’s numeric project ID.

Report whether this process is running on Google Compute Engine.

Get the value of the provided project attribute.

Get the list of user-defined attributes applying to the project as a whole, not just this VM.

Get the current instance’s project ID string.

Get the service account scopes for the given account.

Get the current VM’s zone, such as us-central1-b.

Type Definitions

Wrapper for the Result type with an Error.