Documentation
¶
Index ¶
Constants ¶
const ( Alibaba = "alibaba" AWS = "aws" Azure = "azure" GCP = "gcp" IBM = "ibm" Tencent = "tencent" NCP = "ncp" NHN = "nhn" KT = "kt" OpenStack = "openstack" )
Supported Cloud Service Providers
const GlobalMaxConcurrentConnections = 10
GlobalMaxConcurrentConnections caps the total number of goroutines processing connections across all CSPs simultaneously.
Variables ¶
var AllCSPs = []string{ AWS, Azure, GCP, Alibaba, Tencent, IBM, OpenStack, NCP, NHN, KT, }
AllCSPs is the list of all supported Cloud Service Providers
Functions ¶
func RegisterCloudPlatform ¶ added in v0.12.3
func RegisterCloudPlatform(cspName, platformType string)
RegisterCloudPlatform registers a CSP instance name to its cloud platform type. This is called during startup from RegisterAllCloudInfo().
func ResolveCloudPlatform ¶ added in v0.12.3
ResolveCloudPlatform returns the cloud platform type for a given CSP instance name. For standard CSPs (aws, azure, etc.), returns the name unchanged. For derived CSPs (openstack-new01), returns the base platform type (openstack). If no mapping is registered, returns the input name as-is (identity mapping).
Types ¶
type RateLimitConfig ¶ added in v0.12.3
type RateLimitConfig struct {
// Resource registration: max connections processed in parallel per CSP
MaxConcurrentRegistrations int
// Resource registration: stagger delay range (ms) to avoid API burst
RegistrationDelayMinMs int
RegistrationDelayMaxMs int
// VM creation: max regions processed in parallel per CSP
MaxConcurrentRegions int
// VM creation: max VMs created in parallel per region
MaxVMsPerRegion int
// VM status fetching: max regions queried in parallel per CSP
MaxConcurrentRegionsForStatus int
// VM status fetching: max VMs queried in parallel per region
MaxVMsPerRegionForStatus int
}
RateLimitConfig holds per-CSP rate limiting configuration. All concurrency/rate values are centralized here to ensure consistency across VM creation, resource registration, status fetching, and other parallel operations. When adding a new CSP, add an entry here to configure its behavior.
func GetRateLimitConfig ¶ added in v0.12.3
func GetRateLimitConfig(providerName string) RateLimitConfig
GetRateLimitConfig returns the rate limiting configuration for a given CSP. Uses ResolveCloudPlatform to look up the platform type for derived CSPs (e.g., "openstack-new01" resolves to "openstack" config). Returns the default configuration if the CSP is not explicitly configured.