Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultSettingsFilters = Filters{ "builtin:logmonitoring.logs-on-grail-activate": { ShouldDiscard: func(json map[string]interface{}) (bool, string) { return json["activated"] == false, "'activated' field is set to false" }, }, "builtin:logmonitoring.log-buckets-rules": { ShouldDiscard: func(json map[string]interface{}) (bool, string) { return json["ruleName"] == "default", formatDefaultDiscardReasonMsg(json["ruleName"]) }, }, "builtin:bizevents-processing-buckets.rule": { ShouldDiscard: func(json map[string]interface{}) (bool, string) { return json["ruleName"] == "default", formatDefaultDiscardReasonMsg(json["ruleName"]) }, }, "builtin:alerting.profile": { ShouldDiscard: func(json map[string]interface{}) (bool, string) { return json["name"] == "Default" || json["name"] == "Default for ActiveGate Token Expiry", formatDefaultDiscardReasonMsg(json["name"]) }, }, "builtin:logmonitoring.log-events": { ShouldDiscard: func(json map[string]interface{}) (bool, string) { return json["summary"] == "Default Kubernetes Log Events", formatDefaultDiscardReasonMsg("Default Kubernetes Log Events") }, }, }
DefaultSettingsFilters is the default Filters used for settings 2.0
Functions ¶
func Download ¶ added in v2.10.1
func Download(client client.SettingsClient, projectName string, filters Filters, schemaIDs ...config.SettingsType) (v2.ConfigsPerType, error)
Types ¶
type Filter ¶
type Filter struct { // ShouldDiscard contains logic whether a settings object should be discarded // based on specific criteria on the settings value payload. It returns true or false // depending on the specific implementation and a reason that gives more context to the // evaluation result, e.g. a filter that discards settings that contain a field "foo" // with a value "bar" in their payload would be implemented like: // func (json map[string]interface{}) (bool, string) { return json["foo"] == "bar", "foo is set to bar" } ShouldDiscard func(map[string]interface{}) (discard bool, reason string) }
Filter can be used to filter/discard settings 2.0
Click to show internal directories.
Click to hide internal directories.