Files
edgeguard-native/cmd/edgeguard-ctl/main.go
Felix Netzel 0ceab4c814 chore: initial skeleton
- docs/architecture.md: native rewrite plan (5 services + control plane,
  Active-Active cluster like nmg, Floating-IP for HTTP ingress)
- cmd/edgeguard-{api,scheduler,ctl}: minimal Gin + CLI stubs
- packaging/debian/edgeguard-{api,ui,meta}: control + maintainer scripts
- deploy/systemd/edgeguard-api.service + edgeguard-scheduler.service
  with hardening defaults
- Makefile: build / cross-compile (amd64+arm64) / deb / publish targets
- scripts/install.sh + scripts/apt-repo/build-package.sh stubs
2026-05-08 18:45:41 +02:00

41 lines
935 B
Go

package main
import (
"fmt"
"os"
)
var version = "0.0.1-dev"
const usage = `edgeguard-ctl — EdgeGuard CLI
Usage:
edgeguard-ctl <command> [args]
Commands:
version Print version
initdb Initialise PostgreSQL database and user (idempotent)
migrate up Apply pending migrations
migrate down Roll back last migration (dev only)
cluster-join Join an existing cluster (--from URL --token TOKEN)
cluster-leave Leave the cluster cleanly
promote Promote this node's PG to primary
dump-config Print effective config to stdout
`
func main() {
if len(os.Args) < 2 {
fmt.Fprint(os.Stderr, usage)
os.Exit(2)
}
switch os.Args[1] {
case "version":
fmt.Println(version)
case "-h", "--help", "help":
fmt.Print(usage)
default:
fmt.Fprintf(os.Stderr, "edgeguard-ctl: command %q not yet implemented\n", os.Args[1])
os.Exit(2)
}
}