package main // route-proxy handed to the provisioner (novox/hq ADR 0349 clause 12, issue 792): the module runs the SDK's provider // helper for `route`, so a consumer of a route — a handed gitea reading `${bound:route:name-web}` — is told its public // name from the entry in this module's bucket, the one its machine's client fills its files from. // // **It composes nothing.** A route's public name is the label its consumer chose joined to the node's public domain, // which only the controller knows (the domain is placement), so the controller composes it and carries it in the // consumer's plan entry (`names`); the helper copies it into the entry's values unchanged. There is no credential for // a route and nothing to make. The proxy itself serves the same plans' entries (cmd/route-proxy plans.go), the one // source of routes (issue 774, research 072 row 34). import ( "git.novox.be/novox/mesh-sdk/go/provider" "route-proxy/internal/routestate" ) // ProvisionName is what route-proxy provides, as its manifest says, and ModuleName this module. const ( ProvisionName = routestate.Provision ModuleName = routestate.Module ) // newProvider is route-proxy answering its consumers over bus on node: the route, served as the manifest serves it // (nothing of its own), with no credential, and nothing to make or retire for a consumer. func newProvider(node string, bus provider.Bus, logf func(string, ...any)) *provider.Provider { return provider.New(provider.Options{ Node: node, Module: ModuleName, Offers: map[string]provider.Offer{ProvisionName: { Credential: provider.NoCredential, Serves: map[string]any{}, }}, Bus: bus, Logf: logf, }) }