idlewatcher/waker: refactor

This commit is contained in:
yusing
2025-03-08 07:59:10 +08:00
parent 1078731f2d
commit d4d2efe925
3 changed files with 15 additions and 8 deletions

View File

@@ -7,6 +7,17 @@ import (
"github.com/docker/docker/api/types/container"
)
type (
containerMeta struct {
ContainerID, ContainerName string
}
containerState struct {
running bool
ready bool
err error
}
)
func (w *Watcher) containerStop(ctx context.Context) error {
return w.client.ContainerStop(ctx, w.ContainerID, container.StopOptions{
Signal: string(w.StopSignal),