{"modulePath":"github.com/Project-Voltron/argo-workflows","version":"v2.0.0+incompatible","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package executor\n\n## Variables\n\n```go\nvar DefaultRetry = wait.Backoff{\n\tSteps:    5,\n\tDuration: 10 * time.Millisecond,\n\tFactor:   1.0,\n\tJitter:   0.1,\n}\n```\nDefaultRetry is a default retry backoff settings when retrying API calls\n\n## Types\n\n```go\ntype WorkflowExecutor struct {\n\tPodName            string\n\tTemplate           wfv1.Template\n\tClientSet          kubernetes.Interface\n\tNamespace          string\n\tPodAnnotationsPath string\n\tExecutionControl   *common.ExecutionControl\n\t// contains filtered or unexported fields\n}\n```\nWorkflowExecutor is program which runs as the init/wait container\n\n```go\nfunc NewExecutor(clientset kubernetes.Interface, podName, namespace, podAnnotationsPath string) WorkflowExecutor\n```\nNewExecutor instantiates a new workflow executor\n\n```go\nfunc (we *WorkflowExecutor) AddAnnotation(key, value string) error\n```\nAddAnnotation adds an annotation to the workflow pod\n\n```go\nfunc (we *WorkflowExecutor) AddError(err error)\n```\nAddError adds an error to the list of encountered errors durign execution\n\n```go\nfunc (we *WorkflowExecutor) AnnotateOutputs() error\n```\nAnnotateOutputs annotation to the pod indicating all the outputs.\n\n```go\nfunc (we *WorkflowExecutor) CaptureScriptResult() error\n```\nCaptureScriptResult will add the stdout of a script template as output result\n\n```go\nfunc (we *WorkflowExecutor) ExecResource(action string, manifestPath string) (string, error)\n```\nExecResource will run kubectl action against a manifest\n\n```go\nfunc (we *WorkflowExecutor) GetMainContainerID() (string, error)\n```\nGetMainContainerID returns the container id of the main container\n\n```go\nfunc (we *WorkflowExecutor) GetMainContainerStatus() (*apiv1.ContainerStatus, error)\n```\nGetMainContainerStatus returns the container status of the main container, nil if the main container does not exist\n\n```go\nfunc (we *WorkflowExecutor) HandleError()\n```\nHandleError is a helper to annotate the pod with the error message upon a unexpected executor panic or error\n\n```go\nfunc (we *WorkflowExecutor) InitDriver(art wfv1.Artifact) (artifact.ArtifactDriver, error)\n```\nInitDriver initializes an instance of an artifact driver\n\n```go\nfunc (we *WorkflowExecutor) LoadArtifacts() error\n```\nLoadArtifacts loads aftifacts from location to a container path\n\n```go\nfunc (we *WorkflowExecutor) LoadExecutionControl() error\n```\nLoadExecutionControl reads the execution control definition from the the Kubernetes downward api annotations volume file\n\n```go\nfunc (we *WorkflowExecutor) LoadTemplate() error\n```\nLoadTemplate reads the template definition from the the Kubernetes downward api annotations volume file\n\n```go\nfunc (we *WorkflowExecutor) SaveArtifacts() error\n```\nSaveArtifacts uploads artifacts to the archive location\n\n```go\nfunc (we *WorkflowExecutor) SaveParameters() error\n```\nSaveParameters will save the content in the specified file path as output parameter value\n\n```go\nfunc (we *WorkflowExecutor) SaveResourceParameters(resourceName string) error\n```\nSaveResourceParameters will save any resource output parameters\n\n```go\nfunc (we *WorkflowExecutor) StageFiles() error\n```\nStageFiles will create any files required by script/resource templates\n\n```go\nfunc (we *WorkflowExecutor) Wait() (err error)\n```\nWait is the sidecar container logic which waits for the main container to complete. Also monitors for updates in the pod annotations which may change (e.g. terminate) Upon completion, kills any sidecars after it finishes.\n\n```go\nfunc (we *WorkflowExecutor) WaitResource(resourceName string) error\n```\nWaitResource waits for a specific resource to satisfy either the success or failure condition\n\n","path":"github.com/Project-Voltron/argo-workflows/workflow/executor","name":"executor","synopsis":"","isRedistributable":true}
