Documentation
¶
Index ¶
- Variables
- func GetClusterName(ctx context.Context) (string, error)
- func GetHostAlias(ctx context.Context) (string, error)
- func GetHostname(ctx context.Context, options map[string]interface{}) (string, error)
- func GetNTPHosts(ctx context.Context) []string
- func HostnameIdentifiers(ctx context.Context) ([]string, error)
- func IsRunningOn(ctx context.Context) bool
Constants ¶
This section is empty.
Variables ¶
var (
// CloudProviderName contains the inventory name of for EC2
CloudProviderName = "Azure"
)
declare these as vars not const to ease testing
Functions ¶
func GetClusterName ¶
GetClusterName returns the name of the cluster containing the current VM by parsing the resource group name. It expects the resource group name to have the format (MC|mc)_resource-group_cluster-name_zone
func GetHostAlias ¶
GetHostAlias returns the VM ID from the Azure Metadata api
func GetHostname ¶
GetHostname returns hostname based on Azure instance metadata.
func GetNTPHosts ¶
GetNTPHosts returns the NTP hosts for Azure if it is detected as the cloud provider, otherwise an empty array. Demo: https://docs.microsoft.com/en-us/azure/virtual-machines/linux/time-sync
func HostnameIdentifiers ¶
HostnameIdentifiers returns list of Azure-specific identifiers for StackState topology
func IsRunningOn ¶
IsRunningOn returns true if the agent is running on Azure
Types ¶
This section is empty.