From d6acf5530e14e54ca7f023883d5cbd5f8bff97ed Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Mon, 4 Jan 2021 01:14:40 -0500 Subject: [PATCH] fix: add some comments --- plugins/common/docker.go | 2 +- plugins/common/log.go | 2 +- plugins/logs/logs.go | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/plugins/common/docker.go b/plugins/common/docker.go index 18df7ecd5..51f24f5b2 100644 --- a/plugins/common/docker.go +++ b/plugins/common/docker.go @@ -244,7 +244,7 @@ func DockerInspect(containerOrImageID, format string) (output string, err error) return } -// DockerInspect runs an inspect command with a given format against a container ID +// DockerSignal sends a given signal (in string form) to a docker container func DockerSignal(containerID, signal string) (err error) { return sh.Command(DockerBin(), "kill", fmt.Sprintf("--signal=%s", signal), containerID).Run() } diff --git a/plugins/common/log.go b/plugins/common/log.go index e7a988031..1a64ca241 100644 --- a/plugins/common/log.go +++ b/plugins/common/log.go @@ -94,7 +94,7 @@ func LogVerboseQuietContainerLogs(containerID string) { } } -// LogVerboseQuietContainerLogs is the verbose log formatter for container logs +// LogVerboseQuietContainerLogsTail is the verbose log formatter for container logs with tail mode enabled func LogVerboseQuietContainerLogsTail(containerID string) { sc := NewShellCmdWithArgs(DockerBin(), "container", "logs", containerID, "--follow", "--tail", "10") stdout, _ := sc.Command.StdoutPipe() diff --git a/plugins/logs/logs.go b/plugins/logs/logs.go index c966ba25a..7af0000af 100644 --- a/plugins/logs/logs.go +++ b/plugins/logs/logs.go @@ -18,6 +18,7 @@ var ( } ) +// VectorImage contains the default vector image to run const VectorImage = "timberio/vector:0.11.X-debian" // GetFailedLogs outputs failed deploy logs for a given app