{"modulePath":"github.com/codefresh-io/argo-workflows","version":"v2.5.2+incompatible","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package common\n\n## Constants\n\n```go\nconst KillGracePeriod = 10\n```\nkillGracePeriod is the time in seconds after sending SIGTERM before forcefully killing the sidecar with SIGKILL (value matches k8s)\n\n## Functions\n\n```go\nfunc CopyArchive(c KubernetesClientInterface, containerID, sourcePath, destPath string) error\n```\nCopyArchive downloads files and directories as a tarball and saves it to a specified path.\n\n```go\nfunc GetContainerID(container *v1.ContainerStatus) string\n```\nGetContainerID returns container ID of a ContainerStatus resource\n\n```go\nfunc KillGracefully(c KubernetesClientInterface, containerID string) error\n```\nKillGracefully kills a container gracefully.\n\n```go\nfunc TerminatePodWithContainerID(c KubernetesClientInterface, containerID string, sig syscall.Signal) error\n```\nTerminatePodWithContainerID invoke the given SIG against the PID1 of the container. No-op if the container is on the hostPID\n\n```go\nfunc WaitForTermination(c KubernetesClientInterface, containerID string, timeout time.Duration) error\n```\nWaitForTermination of the given containerID, set the timeout to 0 to discard it\n\n## Types\n\n```go\ntype KubernetesClientInterface interface {\n\tGetContainerStatus(containerID string) (*v1.Pod, *v1.ContainerStatus, error)\n\tKillContainer(pod *v1.Pod, container *v1.ContainerStatus, sig syscall.Signal) error\n\tCreateArchive(containerID, sourcePath string) (*bytes.Buffer, error)\n}\n```\nKubernetesClientInterface is the interface to implement getContainerStatus method\n\n","path":"github.com/codefresh-io/argo-workflows/workflow/executor/common","name":"common","synopsis":"","isRedistributable":true}
