fix: 恢复腾讯云账单同步并完善成本预测
- 接入腾讯云单日账单、全局限频和指数退避 - 修正月末费用预测并增加账期提示和费用归因 - 补充腾讯云限频及账单归因回归测试
This commit is contained in:
1 parent
88c41f0b2b
commit
dd3770a66c
15 files changed
+610
-17
No files matched your search
@@ -16,13 +16,16 @@ type BillingFetcher interface {
|
||||
FetchDailyBill(billingDate string) ([]CloudBillingRecord, error)
|
||||
}
|
||||
|
||||
// SupportedBillingProviders 已接入账单 API 的云厂商列表。 // Logan.Li
|
||||
var SupportedBillingProviders = []string{"aliyun", "tencent"}
|
||||
|
||||
// NewBillingFetcher 根据云厂商创建账单拉取器
|
||||
func NewBillingFetcher(provider, accessKey, secretKey string) BillingFetcher {
|
||||
switch provider {
|
||||
case "aliyun":
|
||||
if p := NewAliyunProvider(accessKey, secretKey); p != nil {
|
||||
return p
|
||||
}
|
||||
return NewAliyunProvider(accessKey, secretKey)
|
||||
case "tencent":
|
||||
return NewTencentProvider(accessKey, secretKey)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user