cloud

package
v0.9.9 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CloudTypeUnknown = "unknown"
	CloudTypeAws     = "aws"
	CloudTypeAzure   = "azure"
	CloudTypeAliyun  = "aliyun"
	CloudTypeHuawei  = "huawei"
	CloudTypeTencent = "tencent"
)

Variables

This section is empty.

Functions

func CloudType

func CloudType() string

func GetAliEcsInstanceType

func GetAliEcsInstanceType() ([]byte, error)

func GetAliEcsMetadataToken

func GetAliEcsMetadataToken() ([]byte, error)

func GetAliEcsNetbwEgress

func GetAliEcsNetbwEgress() ([]byte, error)

func GetAliEcsNetbwIngress

func GetAliEcsNetbwIngress() ([]byte, error)

func GetAliEcsNetworkSpeed

func GetAliEcsNetworkSpeed() (int, error)

func GetAwsEc2NetSpeed

func GetAwsEc2NetSpeed() (int, error)

func GetAzureVMInstanceMetadata

func GetAzureVMInstanceMetadata() ([]byte, error)

func GetEC2IMDSv2Token

func GetEC2IMDSv2Token() ([]byte, error)

func GetEC2InstanceType

func GetEC2InstanceType() ([]byte, error)

func GetHuaweiEcsMetadata

func GetHuaweiEcsMetadata() ([]byte, error)

func GetHuaweiEcsNetworkSpeed

func GetHuaweiEcsNetworkSpeed() (int, error)

func GetNicSpeed

func GetNicSpeed() (int, error)

func GetTencentCvmBandwidthEgress

func GetTencentCvmBandwidthEgress() ([]byte, error)

func GetTencentCvmBandwidthIngress

func GetTencentCvmBandwidthIngress() ([]byte, error)

func GetTencentCvmInstanceType

func GetTencentCvmInstanceType() ([]byte, error)

func GetTencentCvmNetworkSpeed

func GetTencentCvmNetworkSpeed() (int, error)

func IsAliyun

func IsAliyun() bool

func IsAws

func IsAws() bool

func IsAzure

func IsAzure() bool

func IsHuawei

func IsHuawei() bool

func IsTencent

func IsTencent() bool

Types

type HuaweiEcsNetworkData

type HuaweiEcsNetworkData struct {
	Qos *HuaweiEcsNetworkQosData `json:"qos"`
}

func GetHuaweiEcsNetworkData

func GetHuaweiEcsNetworkData() (*HuaweiEcsNetworkData, error)

type HuaweiEcsNetworkQosData

type HuaweiEcsNetworkQosData struct {
	InstanceMinBandwidth int `json:"instance_min_bandwidth"`
	InstanceMaxBandwidth int `json:"instance_max_bandwidth"`
}

Jump to

Keyboard shortcuts

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