{"modulePath":"github.com/codefresh-io/argo-workflows","version":"v0.4.7","isLatest":false,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package controller\n\n## Types\n\n```go\ntype AppHealthManager interface {\n\tGetAppHealth(server string, namespace string, comparisonResult *appv1.ComparisonResult) (*appv1.HealthStatus, error)\n}\n```\n\n```go\nfunc NewAppHealthManager(db db.ArgoDB, namespace string) AppHealthManager\n```\n\n```go\ntype AppStateManager interface {\n\tCompareAppState(app *v1alpha1.Application) (*v1alpha1.ComparisonResult, *repository.ManifestResponse, error)\n\tSyncAppState(app *v1alpha1.Application, revision string, overrides *[]v1alpha1.ComponentParameter, dryRun bool, prune bool) *v1alpha1.OperationState\n}\n```\nAppStateManager defines methods which allow to compare application spec and actual application state.\n\n```go\nfunc NewAppStateManager(\n\tdb db.ArgoDB,\n\tappclientset appclientset.Interface,\n\trepoClientset reposerver.Clientset,\n\tnamespace string,\n) AppStateManager\n```\nNewAppStateManager creates new instance of Ksonnet app comparator\n\n```go\ntype ApplicationController struct {\n\t// contains filtered or unexported fields\n}\n```\nApplicationController is the controller for application resources.\n\n```go\nfunc NewApplicationController(\n\tnamespace string,\n\tkubeClientset kubernetes.Interface,\n\tapplicationClientset appclientset.Interface,\n\tdb db.ArgoDB,\n\tappStateManager AppStateManager,\n\tappHealthManager AppHealthManager,\n\tappResyncPeriod time.Duration,\n\tconfig *ApplicationControllerConfig,\n) *ApplicationController\n```\nNewApplicationController creates new instance of ApplicationController.\n\n```go\nfunc (ctrl *ApplicationController) Run(ctx context.Context, statusProcessors int, operationProcessors int)\n```\nRun starts the Application CRD controller.\n\n```go\ntype ApplicationControllerConfig struct {\n\tInstanceID string\n\tNamespace  string\n}\n```\n\n```go\ntype KsonnetAppStateManager struct {\n\t// contains filtered or unexported fields\n}\n```\nKsonnetAppStateManager allows to compare application using KSonnet CLI\n\n```go\nfunc (ks *KsonnetAppStateManager) CompareAppState(app *v1alpha1.Application) (*v1alpha1.ComparisonResult, *repository.ManifestResponse, error)\n```\nCompareAppState compares application spec and real app state using KSonnet\n\n```go\nfunc (s *KsonnetAppStateManager) SyncAppState(\n\tapp *v1alpha1.Application, revision string, overrides *[]v1alpha1.ComponentParameter, dryRun bool, prune bool) *v1alpha1.OperationState\n```\n\n","path":"github.com/codefresh-io/argo-workflows/controller","name":"controller","synopsis":"","isRedistributable":true}
