SimpleWatchReactor is a WatchReactor. Each reaction function is attached to a given resource. "*" matches everything for that value. For instance, *,pods matches all verbs on pods. This allows for easier composition of reaction functions
| 517 | // SimpleWatchReactor is a WatchReactor. Each reaction function is attached to a given resource. "*" matches everything for that value. |
| 518 | // For instance, *,pods matches all verbs on pods. This allows for easier composition of reaction functions |
| 519 | type SimpleWatchReactor struct { |
| 520 | Resource string |
| 521 | |
| 522 | Reaction WatchReactionFunc |
| 523 | } |
| 524 | |
| 525 | func (r *SimpleWatchReactor) Handles(action Action) bool { |
| 526 | resourceCovers := r.Resource == "*" || r.Resource == action.GetResource().Resource |
nothing calls this directly
no outgoing calls
no test coverage detected