Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetTargetObjKey ¶
func GetTargetObjKey(a *appv1.Application, un *unstructured.Unstructured, isNamespaced bool) kube.ResourceKey
Types ¶
type LiveStateCache ¶
type LiveStateCache interface { IsNamespaced(server string, gk schema.GroupKind) (bool, error) // Executes give callback against resource specified by the key and all its children IterateHierarchy(server string, key kube.ResourceKey, action func(child appv1.ResourceNode, appName string)) error // Returns state of live nodes which correspond for target nodes of specified application. GetManagedLiveObjs(a *appv1.Application, targetObjs []*unstructured.Unstructured) (map[kube.ResourceKey]*unstructured.Unstructured, error) // Returns all top level resources (resources without owner references) of a specified namespace GetNamespaceTopLevelResources(server string, namespace string) (map[kube.ResourceKey]appv1.ResourceNode, error) // Starts watching resources of each controlled cluster. Run(ctx context.Context) error // Invalidate invalidates the entire cluster state cache Invalidate() }
func NewLiveStateCache ¶
func NewLiveStateCache( db db.ArgoDB, appInformer cache.SharedIndexInformer, settingsMgr *settings.SettingsManager, kubectl kube.Kubectl, metricsServer *metrics.MetricsServer, onObjectUpdated ObjectUpdatedHandler) LiveStateCache
type ObjectUpdatedHandler ¶
type ObjectUpdatedHandler = func(managedByApp map[string]bool, ref v1.ObjectReference)
Click to show internal directories.
Click to hide internal directories.