Documentation
¶
Overview ¶
Command app is the Go API of the SRS 11.2 reference stack. It runs on the emulated GKE cluster behind the load balancer and the Istio ingress gateway and uses Google Cloud exactly as a production service would: default endpoints, default credentials (the GKE metadata server through Workload Identity) and no emulator configuration at all.
GET /api/health liveness through LB → Istio (step 4)
POST /api/work writes an object to Cloud Storage, inserts a row in
Cloud SQL through the Go connector with IAM database
authentication over private IP, publishes a Pub/Sub
message (step 5); 403 + PERMISSION_DENIED when IAM
denies any of them (step 8)
POST /api/push Pub/Sub push endpoint; verifies the OIDC token
(step 6) and records the delivery
GET /api/received deliveries recorded by /api/push
GET /api/egress fetches ?url= from the internet (step 7)
GET /api/digest resolves image ?ref= in Artifact Registry with
go-containerregistry, as crane digest does (step 6c)
Configuration (environment): PROJECT, BUCKET, TOPIC, SQL_INSTANCE (connection name), SQL_USER (IAM user), SQL_DB, PUSH_AUDIENCE, PUSH_SA (expected token email), PORT (default 8080).