catalogue's working set starts empty and a host gives it the seats it read (UseSeats over SeatsFromDefinitions); the node-engine's verbs and events take the seat's name from the caller. Tests take their seats from seatlisttest. Claude-Session: https://claude.ai/code/session_01JG73KJNrH5EgFXMKKYSrig
16 lines
662 B
Go
16 lines
662 B
Go
package catalogue
|
|
|
|
// EngineVerbs are the node-engine seat's verbs as the seat list the host gave has them (ADR 0563 §1; design 26), each
|
|
// with its description and its input's schema as discovery shows them. The seat's name is its contract's
|
|
// (mesh-contracts' nodeengine), never this package's (ADR 0634 §4, ADR 0635 §4): the caller names it.
|
|
func EngineVerbs(seat string) []Verb {
|
|
s, _ := SeatNamed(seat)
|
|
return append([]Verb(nil), s.Serves...)
|
|
}
|
|
|
|
// EngineEvents are what the node-engine seat says, as the seat list the host gave has them.
|
|
func EngineEvents(seat string) []string {
|
|
s, _ := SeatNamed(seat)
|
|
return append([]string(nil), s.Emits...)
|
|
}
|