Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Filters []filtertypes.FilterMeta
Actions []actiontypes.ActionMeta
FilterRegistry *filterregistry.Registry
ActionRegistry *actionregistry.Registry
Executor *executor.Executor
}
type EventHandler ¶
EventHandler is given to Source to be called. Source is responsible to call this function.
sourceType is what type the Source is.
event is what event happened, containing a brief event object. Do not include complex objects in it. For example, a k8s-resource-watcher Source may contain what event happened (create, update, delete) in it.
data is the detailed event, for machines to process, e.g. passed to filters to do filtering . You may put complex objects in it. For example, a k8s-resource-watcher Source may contain the entire object that is changed in it.
func NewFromConfig ¶
func NewFromConfig(c Config) EventHandler
func (EventHandler) AddHandlerAfter ¶
func (e EventHandler) AddHandlerAfter(eh EventHandler) EventHandler
AddHandlerAfter adds a new EventHandler to be called after e is called.
func (EventHandler) AddHandlerBefore ¶
func (e EventHandler) AddHandlerBefore(eh EventHandler) EventHandler
AddHandlerBefore adds a new EventHandler to be called before e is called.