Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Handler map[v1alpha1.ActionMeta]string Executor *executor.Executor }
Config is the config for trigger
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 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 resource-watcher Source may contain the entire object that is changed in it.
func NewFromConfig ¶
func NewFromConfig(ctx context.Context, cli client.Client, actionMeta v1alpha1.ActionMeta, filterMeta string, executor *executor.Executor) EventHandler
NewFromConfig creates a new EventHandler from config.
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.