From 98ade31e3e95858370db7fd3da161db47ca7b773 Mon Sep 17 00:00:00 2001 From: linrunqi08 Date: Mon, 16 Dec 2024 06:11:30 +0000 Subject: [PATCH] fix comments --- pkg/helper/docker_center.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pkg/helper/docker_center.go b/pkg/helper/docker_center.go index 275fdd18a0..109305e707 100644 --- a/pkg/helper/docker_center.go +++ b/pkg/helper/docker_center.go @@ -457,7 +457,7 @@ type DockerCenter struct { // sandbox meta would be saved to its bound container. containerMap map[string]*DockerInfoDetail // all containers will in this map client DockerCenterClientInterface - containerHelper *DockerCenterHelperWrapper + containerHelper ContainerHelperInterface lastErrMu sync.Mutex lastErr error lock sync.RWMutex @@ -477,14 +477,14 @@ type DockerCenterClientInterface interface { Events(ctx context.Context, options types.EventsOptions) (<-chan events.Message, <-chan error) } -type DockerCenterHelperInterface interface { +type ContainerHelperInterface interface { ContainerProcessAlive(pid int) bool } -type DockerCenterHelperWrapper struct { +type ContainerHelperWrapper struct { } -func (r *DockerCenterHelperWrapper) ContainerProcessAlive(pid int) bool { +func (r *ContainerHelperWrapper) ContainerProcessAlive(pid int) bool { return ContainerProcessAlive(pid) } @@ -653,7 +653,7 @@ func getDockerCenterInstance() *DockerCenter { // load EnvTags first LoadEnvTags() dockerCenterInstance = &DockerCenter{ - containerHelper: &DockerCenterHelperWrapper{}, + containerHelper: &ContainerHelperWrapper{}, } dockerCenterInstance.imageCache = make(map[string]string) dockerCenterInstance.containerMap = make(map[string]*DockerInfoDetail)