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
24 lines
703 B
Go
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
|
|
}
|