Files
mesh-catalog/modules/mesh-config/cmd/mesh-config/readers.go
T
jschoubben c9d8950fd0 Every module follows the assigner's new places: the contracts' go/ path, mesh-wants in the delivery contracts, the state and tool assignments (issue 1966)
The legacy key form placement.<node> is gone from the client, so the readers and their fixtures lose it. The check noplacement
now also refuses the assigner's retired names in a manifest.

Claude-Session: https://claude.ai/code/session_01NcbgfFSnn24M3GcqttoU7i
2026-11-05 22:29:07 +01:00

24 lines
703 B
Go

package main
import (
"fmt"
meshwants "git.novox.be/novox/mesh-delivery/contracts/go/seats/meshwants"
)
// The holders whose states this module reads, one constant each (a reader names its holder once; ADR 0634 §4).
const (
assignerModule = "mesh-delivery-assigner"
indexerModule = "mesh-delivery-indexer"
)
// parseWantKey reads a want's key, `want.<node>.<module>`; the want of a node's own and a held fingerprint's key are
// not one.
func parseWantKey(key string) (node, module string, err error) {
node, module, ok := meshwants.ParseWantsByWantNodeModuleKey(key)
if !ok {
return "", "", fmt.Errorf("%q is not the key of a module's want on a node", key)
}
return node, module, nil
}