cache

package
v1.1.0-rc4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 3, 2019 License: Apache-2.0 Imports: 25 Imported by: 0

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 AppUpdatedHandler added in v1.0.0

type AppUpdatedHandler = func(appName string, fullRefresh bool, ref v1.ObjectReference)

type LiveStateCache

type LiveStateCache interface {
	IsNamespaced(server string, obj *unstructured.Unstructured) (bool, error)
	// Executes give callback against resource specified by the key and all its children
	IterateHierarchy(server string, obj *unstructured.Unstructured, action func(child appv1.ResourceNode)) 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)
	// Starts watching resources of each controlled cluster.
	Run(ctx context.Context)
	// Invalidate invalidates the entire cluster state cache
	Invalidate()
}

func NewLiveStateCache

func NewLiveStateCache(
	db db.ArgoDB,
	appInformer cache.SharedIndexInformer,
	settings *settings.ArgoCDSettings,
	kubectl kube.Kubectl,
	metricsServer *metrics.MetricsServer,
	onAppUpdated AppUpdatedHandler) LiveStateCache

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL