tencent

package
v0.0.0-...-c4caace Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// CloudProviderName contains the inventory name of for CVM
	CloudProviderName = "Tencent"
)

declare these as vars not const to ease testing

Functions

func GetHostAlias

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

GetHostAlias returns the VM ID from the Tencent Metadata api

func GetInstanceID

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

GetInstanceID fetches the instance id for current host from the Tencent metadata API

func GetNTPHosts

func GetNTPHosts(ctx context.Context) []string

GetNTPHosts returns the NTP hosts for Tencent if it is detected as the cloud provider, otherwise an empty array. Demo: https://intl.cloud.tencent.com/document/product/213/32379

func HostnameProvider

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

HostnameProvider gets the hostname

func IsRunningOn

func IsRunningOn(ctx context.Context) bool

IsRunningOn returns true if the agent is running on Tencent Cloud

Types

This section is empty.

Jump to

Keyboard shortcuts

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