Documentation ¶
Index ¶
Constants ¶
View Source
const ( CREATED = iota UPDATED DELETED )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Watcher ¶
type Watcher struct {
// contains filtered or unexported fields
}
func NewWatcher ¶
func NewWatcher(ctx context.Context, client dynamic.Interface, action func(action int, obj *unstructured.Unstructured, old *unstructured.Unstructured)) *Watcher
func (*Watcher) GetResources ¶
func (w *Watcher) GetResources(resource string, namespace string) []*unstructured.Unstructured
GetResources return all resources with the same namespace or for all namespaces if namespace=""
For a namespace resource (like pods), only resources for this namespace are returned if a namespace is provided, else all resources for all namespaces are returned. For a cluster resource (like clusterroles), all resources are returned, as the namespace should be empty.
func (*Watcher) LockResource ¶
func (*Watcher) UnlockResource ¶
Click to show internal directories.
Click to hide internal directories.