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

Struct SimpleWatchReactor

testing/fixture.go:519–523  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

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
519type SimpleWatchReactor struct {
520 Resource string
521
522 Reaction WatchReactionFunc
523}
524
525func (r *SimpleWatchReactor) Handles(action Action) bool {
526 resourceCovers := r.Resource == "*" || r.Resource == action.GetResource().Resource

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected