This commit is contained in:
yusing
2026-02-16 08:59:01 +08:00
parent 15b9635ee1
commit e4e6f6b3e8
242 changed files with 3953 additions and 3502 deletions

View File

@@ -1,6 +1,6 @@
package idlewatcher
import gperr "github.com/yusing/goutils/errs"
import "errors"
type ContainerStatus string
@@ -11,4 +11,4 @@ const (
ContainerStatusStopped ContainerStatus = "stopped"
)
var ErrUnexpectedContainerStatus = gperr.New("unexpected container status")
var ErrUnexpectedContainerStatus = errors.New("unexpected container status")

View File

@@ -4,8 +4,7 @@ import (
"context"
"github.com/yusing/godoxy/internal/types"
"github.com/yusing/godoxy/internal/watcher/events"
gperr "github.com/yusing/goutils/errs"
watcherEvents "github.com/yusing/godoxy/internal/watcher/events"
)
type Provider interface {
@@ -15,6 +14,6 @@ type Provider interface {
ContainerStop(ctx context.Context, signal types.ContainerSignal, timeout int) error
ContainerKill(ctx context.Context, signal types.ContainerSignal) error
ContainerStatus(ctx context.Context) (ContainerStatus, error)
Watch(ctx context.Context) (eventCh <-chan events.Event, errCh <-chan gperr.Error)
Watch(ctx context.Context) (eventCh <-chan watcherEvents.Event, errCh <-chan error)
Close()
}