Android-cuttlefish cvd tool
Functions | Variables
cuttlefish::anonymous_namespace{gce_environment.cc} Namespace Reference

Functions

Result< bool > IsGceEnvironment (HttpClient &http_client)
 
Result< std::string > QueryGceMetadata (HttpClient &http_client, std::string_view metadata_key)
 
Result< std::string > GetZoneValue (std::string_view response_string)
 

Variables

constexpr std::string_view kDetectUrl = "metadata.google.internal"
 
constexpr std::string_view kDetectHeader = "Metadata-Flavor"
 
constexpr std::string_view kExpectedDetectHeaderValue = "Google"
 
constexpr std::string_view kGceMetadataUrlBase
 
constexpr std::string_view kNumericProjectId = "project/numeric-project-id"
 
constexpr std::string_view kZone = "instance/zone"
 

Function Documentation

◆ GetZoneValue()

Result< std::string > cuttlefish::anonymous_namespace{gce_environment.cc}::GetZoneValue ( std::string_view  response_string)

◆ IsGceEnvironment()

Result< bool > cuttlefish::anonymous_namespace{gce_environment.cc}::IsGceEnvironment ( HttpClient http_client)

◆ QueryGceMetadata()

Result< std::string > cuttlefish::anonymous_namespace{gce_environment.cc}::QueryGceMetadata ( HttpClient http_client,
std::string_view  metadata_key 
)

Variable Documentation

◆ kDetectHeader

constexpr std::string_view cuttlefish::anonymous_namespace{gce_environment.cc}::kDetectHeader = "Metadata-Flavor"
constexpr

◆ kDetectUrl

constexpr std::string_view cuttlefish::anonymous_namespace{gce_environment.cc}::kDetectUrl = "metadata.google.internal"
constexpr

◆ kExpectedDetectHeaderValue

constexpr std::string_view cuttlefish::anonymous_namespace{gce_environment.cc}::kExpectedDetectHeaderValue = "Google"
constexpr

◆ kGceMetadataUrlBase

constexpr std::string_view cuttlefish::anonymous_namespace{gce_environment.cc}::kGceMetadataUrlBase
constexpr
Initial value:
=
"http://metadata.google.internal/computeMetadata/v1"

◆ kNumericProjectId

constexpr std::string_view cuttlefish::anonymous_namespace{gce_environment.cc}::kNumericProjectId = "project/numeric-project-id"
constexpr

◆ kZone

constexpr std::string_view cuttlefish::anonymous_namespace{gce_environment.cc}::kZone = "instance/zone"
constexpr