SimpleReactor is a Reactor. Each reaction function is attached to a given verb,resource tuple. "*" in either field matches everything for that value. For instance, *,pods matches all verbs on pods. This allows for easier composition of reaction functions
| 491 | // SimpleReactor is a Reactor. Each reaction function is attached to a given verb,resource tuple. "*" in either field matches everything for that value. |
| 492 | // For instance, *,pods matches all verbs on pods. This allows for easier composition of reaction functions |
| 493 | type SimpleReactor struct { |
| 494 | Verb string |
| 495 | Resource string |
| 496 | |
| 497 | Reaction ReactionFunc |
| 498 | } |
| 499 | |
| 500 | func (r *SimpleReactor) Handles(action Action) bool { |
| 501 | verbCovers := r.Verb == "*" || r.Verb == action.GetVerb() |
nothing calls this directly
no outgoing calls
no test coverage detected