refactor(watcher): rename events package to watcherEvents

- Updated import paths and references from events to watcherEvents across multiple files
This commit is contained in:
yusing
2026-02-15 14:35:23 +08:00
parent d619562f00
commit 1244af0e38
9 changed files with 30 additions and 30 deletions

View File

@@ -11,7 +11,7 @@ import (
"github.com/rs/zerolog/log"
"github.com/yusing/godoxy/internal/docker"
"github.com/yusing/godoxy/internal/types"
"github.com/yusing/godoxy/internal/watcher/events"
watcherEvents "github.com/yusing/godoxy/internal/watcher/events"
)
type (
@@ -64,8 +64,8 @@ var (
dockerWatcherRetryInterval = 3 * time.Second
reloadTrigger = Event{
Type: events.EventTypeDocker,
Action: events.ActionForceReload,
Type: watcherEvents.EventTypeDocker,
Action: watcherEvents.ActionForceReload,
ActorAttributes: map[string]string{},
ActorName: "",
ActorID: "",
@@ -157,12 +157,12 @@ func (w DockerWatcher) parseError(err error) error {
}
func (w DockerWatcher) handleEvent(event dockerEvents.Message, ch chan<- Event) {
action, ok := events.DockerEventMap[event.Action]
action, ok := watcherEvents.DockerEventMap[event.Action]
if !ok {
return
}
ch <- Event{
Type: events.EventTypeDocker,
Type: watcherEvents.EventTypeDocker,
ActorID: event.Actor.ID,
ActorAttributes: event.Actor.Attributes, // labels
ActorName: event.Actor.Attributes["name"],