Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.23'
go-version: '1.24'
cache: true

- name: Run golangci-lint
Expand All @@ -40,7 +40,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.23'
go-version: '1.24'
cache: true

- name: Run tests
Expand All @@ -62,7 +62,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
go-version: ['1.23']
go-version: ['1.24']
steps:
- name: Checkout code
uses: actions/checkout@v4
Expand Down
9 changes: 5 additions & 4 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,17 @@

run:
timeout: 5m
go: '1.23'
go: '1.24'

linters-settings:
errcheck:
check-type-assertions: true
check-blank: true
check-blank: false

govet:
check-shadowing: true
enable-all: true
disable:
- fieldalignment

gofmt:
simplify: true
Expand Down Expand Up @@ -92,7 +93,7 @@ linters:
- funlen # Too noisy for early development
- gocognit # Similar to gocyclo, redundant
- godox # Allow TODO/FIXME comments
- gomnd # Magic number detection - too strict for initial dev
- mnd # Magic number detection - too strict for initial dev
- testpackage # Separate test packages not always needed

issues:
Expand Down
29 changes: 29 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
FROM golang:1.24-alpine AS builder

RUN apk add --no-cache git

WORKDIR /src
COPY go.mod go.sum ./
RUN go mod download
COPY . .

ARG VERSION=dev
ARG COMMIT=unknown
ARG BUILD_TIME=unknown

RUN CGO_ENABLED=0 go build \
-ldflags "-X main.Version=${VERSION} -X main.Commit=${COMMIT} -X main.BuildTime=${BUILD_TIME}" \
-o /queuekitd ./cmd/queuekitd

RUN CGO_ENABLED=0 go build \
-ldflags "-X main.Version=${VERSION} -X main.Commit=${COMMIT} -X main.BuildTime=${BUILD_TIME}" \
-o /queuekit ./cmd/queuekit

FROM gcr.io/distroless/static-debian12:nonroot

COPY --from=builder /queuekitd /queuekitd
COPY --from=builder /queuekit /queuekit

EXPOSE 8080

ENTRYPOINT ["/queuekitd"]
72 changes: 37 additions & 35 deletions PLAN.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,46 +41,48 @@
- [x] Basic logging and instrumentation hooks (`log/slog`, per-event structured logs)
- [x] Fix retry bug: backends now re-schedule non-final failures as `pending` with backoff delay

## Phase 3 – HTTP API
## Phase 3 – HTTP API

- [ ] Choose router (chi/echo)
- [ ] Implement endpoints:
- [ ] `POST /v1/jobs` – enqueue
- [ ] `GET /v1/queues` – list queues
- [ ] `GET /v1/queues/{name}/jobs` – list jobs
- [ ] `POST /v1/jobs/{id}/retry`
- [ ] `POST /v1/jobs/{id}/cancel`
- [ ] API key authentication
- [ ] JSON schema & validation
- [ ] Integration tests against Postgres/Redis backends
- [x] Choose router (`chi/v5`)
- [x] Implement endpoints:
- [x] `POST /v1/jobs` – enqueue
- [x] `GET /v1/queues` – list queues
- [x] `GET /v1/queues/{name}/jobs` – list jobs
- [x] `GET /v1/jobs/{id}` – get job
- [x] `POST /v1/jobs/{id}/retry`
- [x] `POST /v1/jobs/{id}/cancel`
- [x] `DELETE /v1/jobs/{id}` – delete job
- [x] API key authentication (Bearer token middleware)
- [x] JSON validation (leverages `job.Validate()`)
- [x] Integration tests (19 tests with mock backend)

## Phase 4 – Dashboard
## Phase 4 – Dashboard

- [ ] Setup `html/template` with basic layout
- [ ] Views:
- [ ] Queues overview (throughput, latency, failures)
- [ ] Queue details (jobs, statuses, pagination)
- [ ] Job details panel (payload, error, retry)
- [ ] Schedules view
- [ ] Minimal CSS (no framework)
- [ ] Server-side sorting/filtering (no SPA)
- [x] Setup `html/template` with embedded layout
- [x] Views:
- [x] Queues overview (counts, health scores)
- [x] Queue details (jobs, status filter tabs, pagination)
- [x] Job details panel (payload, error, retry button)
- [x] Minimal CSS (no framework, embedded in layout)
- [x] Server-side sorting/filtering (no SPA)

## Phase 5 – CLI (`queuekit`)
## Phase 5 – CLI (`queuekit`)

- [ ] Set up CLI using `cobra` or stdlib `flag`
- [ ] Commands:
- [ ] `queuekit enqueue <type> --queue <name> --payload <json>`
- [ ] `queuekit inspect queues`
- [ ] `queuekit inspect jobs --queue <name>`
- [ ] `queuekit retry <job-id>`
- [ ] Global config via YAML (`~/.config/queuekit/config.yaml`)
- [x] Set up CLI using `cobra`
- [x] Commands:
- [x] `queuekit enqueue <type> --queue <name> --payload <json>`
- [x] `queuekit inspect queues`
- [x] `queuekit inspect jobs --queue <name>`
- [x] `queuekit retry <job-id>`
- [x] `queuekit cancel <job-id>`
- [x] Global config via YAML (`~/.config/queuekit/config.yaml`) with viper

## Phase 6 – Packaging & Examples
## Phase 6 – Packaging & Examples

- [ ] Dockerfile for `queuekitd`
- [ ] `docker-compose.yml` with Postgres + Redis
- [ ] Example integrations:
- [ ] Simple Go service using the client
- [ ] Cron-style recurring jobs
- [ ] Final README polish and screenshots
- [x] Multi-stage Dockerfile for `queuekitd` (distroless final image)
- [x] `docker-compose.yml` with Postgres + Redis
- [x] Example integrations:
- [x] Simple Go service (`examples/simple/`)
- [x] Cron-style recurring jobs (`examples/cron/`)
- [x] README polish with API reference, CLI usage, architecture diagram

Loading
Loading