|
|
@@ -11,12 +11,14 @@ const (
|
|
|
)
|
|
|
|
|
|
const (
|
|
|
+ CloudCostEnvVarPrefix = "CLOUD_COST_"
|
|
|
CloudCostEnabledEnvVar = "CLOUD_COST_ENABLED"
|
|
|
CloudCostMonthToDateIntervalVar = "CLOUD_COST_MONTH_TO_DATE_INTERVAL"
|
|
|
CloudCostRefreshRateHoursEnvVar = "CLOUD_COST_REFRESH_RATE_HOURS"
|
|
|
CloudCostQueryWindowDaysEnvVar = "CLOUD_COST_QUERY_WINDOW_DAYS"
|
|
|
CloudCostRunWindowDaysEnvVar = "CLOUD_COST_RUN_WINDOW_DAYS"
|
|
|
|
|
|
+ CustomCostEnvVarPrefix = "CUSTOM_COST_"
|
|
|
CustomCostEnabledEnvVar = "CUSTOM_COST_ENABLED"
|
|
|
CustomCostQueryWindowDaysEnvVar = "CUSTOM_COST_QUERY_WINDOW_DAYS"
|
|
|
|
|
|
@@ -50,6 +52,14 @@ func GetCloudCostQueryWindowDays() int64 {
|
|
|
return env.GetInt64(CloudCostQueryWindowDaysEnvVar, 7)
|
|
|
}
|
|
|
|
|
|
+func GetCloudCostRunWindowDays() int64 {
|
|
|
+ return env.GetInt64(CloudCostRunWindowDaysEnvVar, 3)
|
|
|
+}
|
|
|
+
|
|
|
+func GetCloudCost1dRetention() int {
|
|
|
+ return env.GetPrefixInt(CloudCostEnvVarPrefix, env.Resolution1dRetentionEnvVar, 30)
|
|
|
+}
|
|
|
+
|
|
|
func GetCustomCostQueryWindowHours() int64 {
|
|
|
return env.GetInt64(CustomCostQueryWindowDaysEnvVar, 1)
|
|
|
}
|
|
|
@@ -58,8 +68,12 @@ func GetCustomCostQueryWindowDays() int64 {
|
|
|
return env.GetInt64(CustomCostQueryWindowDaysEnvVar, 7)
|
|
|
}
|
|
|
|
|
|
-func GetCloudCostRunWindowDays() int64 {
|
|
|
- return env.GetInt64(CloudCostRunWindowDaysEnvVar, 3)
|
|
|
+func GetCustomCost1dRetention() int {
|
|
|
+ return env.GetPrefixInt(CustomCostEnvVarPrefix, env.Resolution1dRetentionEnvVar, 30)
|
|
|
+}
|
|
|
+
|
|
|
+func GetCustomCost1hRetention() int {
|
|
|
+ return env.GetPrefixInt(CustomCostEnvVarPrefix, env.Resolution1hRetentionEnvVar, 49)
|
|
|
}
|
|
|
|
|
|
func GetPluginConfigDir() string {
|