fix: restore stoppingEvent/stoppedEvent helpers for plugin stop hook

The stop lifecycle hook added in 672dc14d2 calls stoppingEvent and
stoppedEvent from pkg/compose/plugins.go, but the helpers had been
removed by the earlier wrapper-cleanup in da530c723. The result was a
broken go build for pkg/compose on upstream/main.

Restore the two helpers alongside the symmetric creating/created and
removing/removed pairs so call sites in plugins.go match the existing
pattern used in the same switch.

Signed-off-by: Guillaume Lours <glours@users.noreply.github.com>
This commit is contained in:
Guillaume Lours 2026-05-18 14:42:53 +02:00 committed by Guillaume Lours
parent 5b4586e3a6
commit 71cd334dbd

View file

@ -57,6 +57,16 @@ func createdEvent(id string) api.Resource {
return newEvent(id, api.Done, api.StatusCreated)
}
// stoppingEvent creates a new Stopping in progress Resource
func stoppingEvent(id string) api.Resource {
return newEvent(id, api.Working, api.StatusStopping)
}
// stoppedEvent creates a new Stopped (done) Resource
func stoppedEvent(id string) api.Resource {
return newEvent(id, api.Done, api.StatusStopped)
}
// removingEvent creates a new Removing in progress Resource
func removingEvent(id string) api.Resource {
return newEvent(id, api.Working, api.StatusRemoving)