657fca325e
Adds opt-in extension package internal/automc/ that: - Subscribes to Postgres notifications on a 'servers' table and pushes route changes into server.Routes (no file I/O, no fsnotify). - Provides a WakerFunc that POSTs to a configurable HTTP control plane (server-manager) and polls until state=running. When AUTOMC_DSN is unset, Wire() is a no-op and the binary behaves exactly like upstream itzg/mc-router. Single patch site in main.go (import + 4-line call) keeps upstream rebases trivial. See docs/AUTOMC.md for env vars and the expected DB schema/trigger.
20 lines
330 B
Makefile
20 lines
330 B
Makefile
.PHONY: test
|
|
test:
|
|
go test ./...
|
|
|
|
.PHONY: release
|
|
release:
|
|
curl -sL https://git.io/goreleaser | bash
|
|
|
|
.PHONY: sync-upstream
|
|
sync-upstream:
|
|
git fetch upstream
|
|
git checkout automc
|
|
git rebase upstream/main
|
|
go build ./...
|
|
go test ./internal/automc/...
|
|
|
|
.PHONY: automc-build
|
|
automc-build:
|
|
go build -o mc-router ./cmd/mc-router
|