Files
mesh-networking/modules/route-proxy/cmd/route-provider/provider.go
T
jschoubben 759a7bff12
mesh/check failed: the composition: route-proxy is defined twice, in novox/mesh-controller and novox/mesh-networking | 759a7bff129b on fe0392e05f62 | …
mesh/delivery-group group feat/1126-removal rejected: composed together: the checker's verdict at the members' heads (6593d973ff2e): the composition
mesh/delivery closed: the pull request closed unmerged
Keep route-proxy's contract a package of its own module, not a second module behind a replace
The group's check failed at go mod verify: the build module's workspace carries one module, so the replace of
./contract named a go.mod it never placed; and ADR 0573 clause 1 refuses a path into another tree. Nothing outside
route-proxy imports the contract today; when one must, it moves into the networking domain's package (research 081).
Issue 1126.

Claude-Session: https://claude.ai/code/session_01NcbgfJ9Gum47zkFKWRaovL
2026-11-02 13:55:07 +01:00

39 lines
1.6 KiB
Go

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 placement holds, so the seat mesh-provisioner 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/contract"
)
// ProvisionName is what route-proxy provides, as its manifest says, and ModuleName this module.
const (
ProvisionName = contract.Provision
ModuleName = contract.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,
})
}