{"modulePath":"github.com/codefresh-io/argo-workflows","version":"v2.5.2+incompatible","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package controller\n\n## Variables\n\n```go\nvar (\n\t// ErrDeadlineExceeded indicates the operation exceeded its deadline for execution\n\tErrDeadlineExceeded = errors.New(errors.CodeTimeout, \"Deadline exceeded\")\n\t// ErrParallelismReached indicates this workflow reached its parallelism limit\n\tErrParallelismReached = errors.New(errors.CodeForbidden, \"Max parallelism reached\")\n)\n```\n\n## Functions\n\n```go\nfunc ReadConfigMapValue(clientset kubernetes.Interface, namespace string, name string, key string) (string, error)\n```\n\n## Types\n\n```go\ntype Throttler interface {\n\tAdd(key interface{}, priority int32, creationTime time.Time)\n\t// Next returns true if item should be processed by controller now or return false.\n\tNext(key interface{}) (interface{}, bool)\n\t// Remove notifies throttler that item processing is done. In responses the throttler triggers processing of previously throttled items.\n\tRemove(key interface{})\n\t// SetParallelism update throttler parallelism limit.\n\tSetParallelism(parallelism int)\n}\n```\nThrottler allows CRD controller to limit number of items it is processing in parallel.\n\n```go\nfunc NewThrottler(parallelism int, queue workqueue.RateLimitingInterface) Throttler\n```\n\n```go\ntype WorkflowController struct {\n\n\t// Config is the workflow controller's configuration\n\tConfig config.WorkflowControllerConfig\n\t// contains filtered or unexported fields\n}\n```\nWorkflowController is the controller for workflow resources\n\n```go\nfunc NewWorkflowController(\n\trestConfig *rest.Config,\n\tkubeclientset kubernetes.Interface,\n\twfclientset wfclientset.Interface,\n\tnamespace string,\n\tmanagedNamespace string,\n\texecutorImage,\n\texecutorImagePullPolicy,\n\tcontainerRuntimeExecutor,\n\tconfigMap string,\n) *WorkflowController\n```\nNewWorkflowController instantiates a new WorkflowController\n\n```go\nfunc (wfc *WorkflowController) GetContainerRuntimeExecutor() string\n```\n\n```go\nfunc (wfc *WorkflowController) GetManagedNamespace() string\n```\n\n```go\nfunc (wfc *WorkflowController) MetricsServer(ctx context.Context)\n```\nMetricsServer starts a prometheus metrics server if enabled in the configmap\n\n```go\nfunc (wfc *WorkflowController) ResyncConfig() error\n```\nResyncConfig reloads the controller config from the configmap\n\n```go\nfunc (wfc *WorkflowController) Run(ctx context.Context, wfWorkers, podWorkers int)\n```\nRun starts an Workflow resource controller\n\n```go\nfunc (wfc *WorkflowController) RunCronController(ctx context.Context)\n```\n\n```go\nfunc (wfc *WorkflowController) RunTTLController(ctx context.Context)\n```\nRunTTLController runs the workflow TTL controller\n\n```go\nfunc (wfc *WorkflowController) TelemetryServer(ctx context.Context)\n```\nTelemetryServer starts a prometheus telemetry server if enabled in the configmap\n\n","path":"github.com/codefresh-io/argo-workflows/workflow/controller","name":"controller","synopsis":"","isRedistributable":true}
