MCPcopy
hub / github.com/kubernetes/client-go / SimpleReactor

Struct SimpleReactor

testing/fixture.go:493–498  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

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
493type SimpleReactor struct {
494 Verb string
495 Resource string
496
497 Reaction ReactionFunc
498}
499
500func (r *SimpleReactor) Handles(action Action) bool {
501 verbCovers := r.Verb == "*" || r.Verb == action.GetVerb()

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected