CI/CD / gate (push) Canceled after 0s
CI/CD / containment (push) Canceled after 0s
CI/CD / image (push) Canceled after 0s
CI/CD / rollout (push) Canceled after 0s
CI/CD / reach (push) Canceled after 0s
CI/CD / fanout (push) Canceled after 0s
CI/CD / receipt (push) Canceled after 0s
Serve and Listen were two names for one act. zip's App already calls it Listen — `app.Listen(zapAddr, httpAddr)` — and this function's whole job is to build that app and hand it its addresses, so calling it Serve made the entry point disagree with the thing it enters. One verb, all the way down: a plugin's main says cloud.Listen, cloud says app.Listen, and nothing has to be translated in a reader's head on the way through. 117 composition roots move with it. ServePlane is untouched — it names a different act (bind one app's own socket for the internal plane), and collapsing it into this would be the opposite of the point. Also fixes apps/iam's TestMain, which had gone red on every store test: credz.Boot's last resort is cek.EnsureDevKey, and that DECLINES on a codec-linked build by design — a build that can really encrypt must be handed a real key, not invent one. So the throwaway goes in through the same door a deployment uses, and only when nothing else supplied one. Six failures back to the one pre-existing ratchet (iam serves 97 untyped ops against a budget of 88). Co-authored-by: Hanzo Dev <dev@hanzo.ai>
29 lines
767 B
Go
29 lines
767 B
Go
package main
|
|
|
|
import (
|
|
"fmt"
|
|
"os"
|
|
|
|
"github.com/hanzoai/cloud"
|
|
"github.com/hanzoai/cloud/apps/code"
|
|
)
|
|
|
|
// Standalone entry for the code app.
|
|
//
|
|
// This is the app's OWN composition root: it links only its own subsystem and
|
|
// the cloud request tier, never the whole fleet, so the build is this one app
|
|
// and not the ~3040-package union the fused binary was. The light host loads it
|
|
// as a plugin; run directly it serves standalone. Its OpenAPI subset comes from
|
|
// `code openapi`. Hand-owned — edit the spec below directly.
|
|
func main() {
|
|
if err := cloud.Listen([]cloud.Plugin{{
|
|
Name: "code",
|
|
Price: cloud.Free,
|
|
Mount: code.Mount,
|
|
Shutdown: code.Shutdown,
|
|
}}, []string{"code"}); err != nil {
|
|
fmt.Fprintln(os.Stderr, err)
|
|
os.Exit(1)
|
|
}
|
|
}
|