Initial implementation: package-updater v1 #1
@@ -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
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user