Documentation ¶
Index ¶
- Variables
- func AddErrorMessages(path, message string)
- func AddInfoMessages(path, message string)
- func DefaultCase(key string, defaultVal, input interface{}) (returnKey string, returnVal interface{})
- func DefaultIntegralCase(key string, defaultVal, input interface{}) (returnKey string, returnVal interface{})
- func DefaultLogGroupClassCase(key string, defaultVal, input interface{}) (returnKey string, returnVal interface{})
- func DefaultRetentionInDaysCase(key string, defaultVal, input interface{}) (returnKey string, returnVal interface{})
- func DefaultStringArrayCase(key string, defaultVal, input interface{}) (returnKey string, returnVal interface{})
- func DefaultTimeIntervalCase(key string, defaultVal, input interface{}) (returnKey string, returnVal interface{})
- func GetTargetPlatform() string
- func InitWindowsObject(objectName, instances, counters, measurement string) map[string]interface{}
- func IsTranslateSuccess() bool
- func IsValid(input interface{}, key string, path string) bool
- func IsValidLogGroupClass(class string) bool
- func IsValidRetentionDays(days int) bool
- func MergePlugins(map1 map[string]interface{}, map2 map[string]interface{}) map[string]interface{}
- func MergeTwoUniqueMaps(map1 map[string]interface{}, map2 map[string]interface{}) map[string]interface{}
- func ProcessDefaultConfig(childRule map[string]Rule, result map[string]interface{}) map[string]interface{}
- func ProcessNoRuleToApply(input interface{}, childRule map[string]Rule, result map[string]interface{}) map[string]interface{}
- func ProcessRuleToApply(input interface{}, childRule map[string]Rule, result map[string]interface{}) map[string]interface{}
- func ProcessRuleToMergeAndApply(input interface{}, childRule map[string]Rule, result map[string]interface{}) map[string]interface{}
- func ResetMessages()
- func SetTargetPlatform(targetPlatform string)
- type Rule
Constants ¶
This section is empty.
Variables ¶
var ErrorMessages = []string{}
ErrorMessages will provide detail error messages to user
var InfoMessages = []string{}
var ValidDays = map[int]bool{}
var ValidLogGroupClasses = []string{util.StandardLogGroupClass, util.InfrequentAccessLogGroupClass}
var ValidRetentionInDays = []string{"-1", "1", "3", "5", "7", "14", "30", "60", "90", "120", "150", "180", "365", "400", "545", "731", "1096", "1827", "2192", "2557", "2922", "3288", "3653"}
ValidRetentionInDays is based on what's supported by PutRetentionPolicy. See https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Agent-Configuration-File-Details.html#CloudWatch-Agent-Configuration-File-Logssection.
Functions ¶
func AddErrorMessages ¶
func AddErrorMessages(path, message string)
func AddInfoMessages ¶
func AddInfoMessages(path, message string)
func DefaultCase ¶
func DefaultCase(key string, defaultVal, input interface{}) (returnKey string, returnVal interface{})
DefaultCase check if current input overrides the default value for the given config entry key.
func DefaultIntegralCase ¶
func DefaultLogGroupClassCase ¶ added in v1.300032.0
func DefaultRetentionInDaysCase ¶ added in v1.247350.0
func DefaultStringArrayCase ¶
func DefaultTimeIntervalCase ¶
func GetTargetPlatform ¶
func GetTargetPlatform() string
func InitWindowsObject ¶
func IsTranslateSuccess ¶
func IsTranslateSuccess() bool
func IsValidLogGroupClass ¶ added in v1.300032.0
func IsValidRetentionDays ¶ added in v1.247350.0
func MergePlugins ¶
Don't modify map1 or map2, it's hard to make sure we don't reference map1 or map2 reference in whole proj This method is mainly to merge different plugins or multiple instances of same plugins
func MergeTwoUniqueMaps ¶
func MergeTwoUniqueMaps(map1 map[string]interface{}, map2 map[string]interface{}) map[string]interface{}
Don't modify map1 or map2, it's hard to make sure we don't reference map1 or map2 reference in whole proj This method is mainly to merge maps which don't have same key, it's a shallow merge. Fail this method if not serving this purpose.
func ProcessDefaultConfig ¶
func ProcessDefaultConfig(childRule map[string]Rule, result map[string]interface{}) map[string]interface{}
ProcessDefaultConfig process the input when user want to use the default configuration. In json the default configuration should be like "cpu":"default"
func ProcessNoRuleToApply ¶
func ProcessNoRuleToApply(input interface{}, childRule map[string]Rule, result map[string]interface{}) map[string]interface{}
ProcessNoRuleToApply check if the the specification configuration provides some configs that don't need translation with rules. In this case, the translation of this config entry should be 1:1 map In json the default configuration should be like "cpu":{"interval":"10s"}
func ProcessRuleToApply ¶
func ProcessRuleToApply(input interface{}, childRule map[string]Rule, result map[string]interface{}) map[string]interface{}
ProcessRuleToApply check if the specification configuration provide some configs that need translation with some rules In json the default configuration should be like "cpu":{"per_cpu":false}
func ProcessRuleToMergeAndApply ¶ added in v1.300049.0
func SetTargetPlatform ¶
func SetTargetPlatform(targetPlatform string)