azure

package
v0.0.0-...-7983b3b Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

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

declare these as vars not const to ease testing

Functions

func GetClusterName

func GetClusterName(ctx context.Context) (string, error)

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

func GetHostAlias(ctx context.Context) (string, error)

GetHostAlias returns the VM ID from the Azure Metadata api

func GetHostname

func GetHostname(ctx context.Context, options map[string]interface{}) (string, error)

GetHostname returns hostname based on Azure instance metadata.

func GetNTPHosts

func GetNTPHosts(ctx context.Context) []string

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

func HostnameIdentifiers(ctx context.Context) ([]string, error)

HostnameIdentifiers returns list of Azure-specific identifiers for StackState topology

func IsRunningOn

func IsRunningOn(ctx context.Context) bool

IsRunningOn returns true if the agent is running on Azure

Types

This section is empty.

Jump to

Keyboard shortcuts

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