From 058b9d8c071f84e9bedb3f7938e33b1a6605d6c4 Mon Sep 17 00:00:00 2001 From: Samuel Enocsson Date: Fri, 22 May 2026 11:53:42 +0200 Subject: [PATCH] feat(updater): Executor interface --- internal/updater/executor.go | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 internal/updater/executor.go diff --git a/internal/updater/executor.go b/internal/updater/executor.go new file mode 100644 index 0000000..e767282 --- /dev/null +++ b/internal/updater/executor.go @@ -0,0 +1,15 @@ +// Package updater contains the FIFO job queue, the single worker that +// drains it, and the abstraction over `docker compose` invocation. +package updater + +import ( + "context" + + "github.com/shcizo/package-updater/internal/discovery" +) + +// Executor runs `docker compose pull` then `up -d` for a single job. +// Defined as an interface so the worker can be tested with a fake. +type Executor interface { + Execute(ctx context.Context, job discovery.Job) error +}