gce

package
v0.0.0-...-914b764 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// CloudProviderName contains the inventory name of for EC2
	CloudProviderName = "GCP"
)

declare these as vars not const to ease testing

Functions

func GetClusterName

func GetClusterName() (string, error)

GetClusterName returns the name of the cluster containing the current GCE instance

func GetHostAlias

func GetHostAlias() (string, error)

GetHostAlias returns the host alias from GCE

func GetHostname

func GetHostname() (string, error)

GetHostname returns the hostname querying GCE Metadata api

func GetNetworkID

func GetNetworkID() (string, error)

GetNetworkID retrieves the network ID using the metadata endpoint. For GCE instances, the the network ID is the VPC ID, if the instance is found to be a part of exactly one VPC.

func GetTags

func GetTags() ([]string, error)

GetTags gets the tags from the GCE api

func HostnameProvider

func HostnameProvider() (string, error)

HostnameProvider GCE implementation of the HostnameProvider

func IsRunningOn

func IsRunningOn() bool

IsRunningOn returns true if the agent is running on GCE

Types

This section is empty.

Jump to

Keyboard shortcuts

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