Merge remote-tracking branch 'origin/main' into feat/the-store-seat-has-verbs
This commit is contained in:
@@ -293,6 +293,12 @@ type Manifest struct {
|
||||
// module claiming a seat answers what that seat's protocol promises (novox/hq ADR 0118).
|
||||
Tools []string `json:"tools,omitempty"`
|
||||
|
||||
// Instances says whether this module's instances are the same anywhere — `interchangeable` —
|
||||
// so a call that names no machine may be answered by any of them (novox/hq ADR 0160). A fact
|
||||
// about the software, not about the bus: a stateless web tool says it; a database does not,
|
||||
// and its instances are then each addressed by machine, never confused for one another.
|
||||
Instances string `json:"instances,omitempty"`
|
||||
|
||||
// Invokes are the tools this module calls, each `<module>.<tool>` or a role's `seat:<seat>.<verb>`,
|
||||
// or the single entry `*` for every tool on the mesh (novox/hq ADR 0152, ADR 0154).
|
||||
//
|
||||
@@ -1173,6 +1179,11 @@ func ParseManifest(raw []byte) (Manifest, error) {
|
||||
m.Module, r))
|
||||
}
|
||||
}
|
||||
if m.Instances != "" && m.Instances != InstancesInterchangeable {
|
||||
problems = append(problems, fmt.Sprintf(
|
||||
"%s says its instances are %q; the one word is %q, for a module that is the same on every machine",
|
||||
m.Module, m.Instances, InstancesInterchangeable))
|
||||
}
|
||||
for _, offer := range m.Provides {
|
||||
p := offer.Name
|
||||
if !name.MatchString(p) {
|
||||
@@ -1960,3 +1971,7 @@ func (o OwnSecrets) Paths() map[string]string {
|
||||
}
|
||||
return out
|
||||
}
|
||||
|
||||
// InstancesInterchangeable is the one value of a definition's `instances`: the module is the same
|
||||
// on every machine, so any instance may answer for the module.
|
||||
const InstancesInterchangeable = "interchangeable"
|
||||
|
||||
Reference in New Issue
Block a user