Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager records which GVK's are watched. When a new GVK needs to be watches, it adds the watch to the associated controller.
func NewManager ¶
func NewManager(cfg *rest.Config, decls *resourcemap.ResourceMap, channel chan event.GenericEvent, options *Options) (*Manager, error)
NewManager starts a new watch manager
func (*Manager) IsWatched ¶
func (m *Manager) IsWatched(gvk schema.GroupVersionKind) bool
IsWatched returns whether the given GVK is being watched
func (*Manager) NeedsUpdate ¶
NeedsUpdate returns true if the Manager's watches need to be updated. This function is threadsafe.
func (*Manager) UpdateWatches ¶
func (m *Manager) UpdateWatches(ctx context.Context, gvkMap map[schema.GroupVersionKind]struct{}) error
UpdateWatches accepts a map of GVKs that should be watched and takes the following actions: - stop watchers for any GroupVersionKind that is not present in the given map. - start watchers for any GroupVersionKind that is present in the given map and not present in the current watch map.
This function is threadsafe.
type Options ¶
type Options struct { // Mapper is the RESTMapper to use for mapping GroupVersionKinds to Resources. Mapper meta.RESTMapper // contains filtered or unexported fields }
Options contains options for creating a watch manager.