Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ConfigPath = "/etc/eventexporter/exporter.yaml"
)
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Route Route `yaml:"route"` ReceiverConfig []sinks.ReceiverConfig `yaml:"receiverConfigs"` }
type Engine ¶
type Engine struct {
Route Route
}
func (*Engine) OnEvent ¶
func (e *Engine) OnEvent(ev *kube.EnhancedEvent)
OnEvent does not care whether event is add or update. Prior filtering should be done int the controller/watcher
type Route ¶
Route allows using rules to drop events or match events to specific receivers. It also allows using routes recursively for complex route building to fit most of the needs
func (*Route) ProcessEvent ¶
func (r *Route) ProcessEvent(ev *kube.EnhancedEvent)
type Rule ¶
type Rule struct { Labels map[string]string Annotations map[string]string Message string APIVersion string Kind string Namespace string Reason string Type string MinCount int32 Component string Host string Receiver string }
Rule is for matching an event
func (*Rule) MatchesEvent ¶
func (r *Rule) MatchesEvent(ev *kube.EnhancedEvent) bool
MatchesEvent compares the rule to an event and returns a boolean value to indicate whether the event is compatible with the rule. All fields are compared as regular expressions so the user must keep that in mind while writing rules.
Click to show internal directories.
Click to hide internal directories.