-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
47 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,15 @@ | ||
package action | ||
|
||
type Action struct { | ||
ActionName string `yaml:"action_name"` | ||
ActionArgs string `yaml:"action_args"` | ||
} | ||
|
||
func GetDefaultAction() Action { | ||
return Action{ActionName: "NOOP_ACTION", ActionArgs: "ARG1,ARG2"} | ||
} | ||
import "alertmanager/types" | ||
|
||
var actionMap = make(ActionLut) | ||
|
||
func GetActionMap() *ActionLut { | ||
return &actionMap | ||
} | ||
|
||
type ActionLut map[string]func(types.Action, map[string]interface{}) error | ||
|
||
func (flut ActionLut) Add(fname string, f func(types.Action, map[string]interface{}) error) { | ||
flut[fname] = f | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,15 @@ | ||
package enrichment | ||
|
||
type Enrichment struct { | ||
EnrichmentName string `yaml:"enrichment_name"` | ||
EnrichmentArgs string `yaml:"enrichment_args"` | ||
} | ||
|
||
func GetDefaultEnrichment() Enrichment { | ||
return Enrichment{EnrichmentName: "NOOP_ENRICHMENT", EnrichmentArgs: "ARG1,ARG2"} | ||
} | ||
import "alertmanager/types" | ||
|
||
var enrichmentMap = make(EnrichmentLut) | ||
|
||
func GetEnrichmentMap() *EnrichmentLut { | ||
return &enrichmentMap | ||
} | ||
|
||
type EnrichmentLut map[string]func(types.Enrichment) (interface{}, error) | ||
|
||
func (flut EnrichmentLut) Add(fname string, f func(types.Enrichment) (interface{}, error)) { | ||
flut[fname] = f | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package types | ||
|
||
type Action struct { | ||
ActionName string `yaml:"action_name"` | ||
ActionArgs string `yaml:"action_args"` | ||
} | ||
|
||
func GetDefaultAction() Action { | ||
return Action{ActionName: "NOOP_ACTION", ActionArgs: "ARG1,ARG2"} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package types | ||
|
||
type Enrichment struct { | ||
EnrichmentName string `yaml:"enrichment_name"` | ||
EnrichmentArgs string `yaml:"enrichment_args"` | ||
} | ||
|
||
func GetDefaultEnrichment() Enrichment { | ||
return Enrichment{EnrichmentName: "NOOP_ENRICHMENT", EnrichmentArgs: "ARG1,ARG2"} | ||
} |