graphvent/group.go

28 lines
476 B
Go

2023-07-20 22:08:28 -06:00
package graphvent
import (
)
2023-10-03 21:18:06 -06:00
var GroupReadPolicy = NewAllNodesPolicy(Tree{
SerializedType(ReadSignalType): {
SerializedType(GroupExtType): {
Hash(FieldNameBase, "members"): nil,
},
},
})
2023-07-25 09:51:55 -06:00
2023-10-03 21:18:06 -06:00
type GroupExt struct {
Members []NodeID `gv:"members"`
2023-07-25 09:51:55 -06:00
}
2023-10-03 21:18:06 -06:00
func NewGroupExt(members []NodeID) *GroupExt {
2023-07-26 11:56:10 -06:00
return &GroupExt{
Members: members,
}
}
func (ext *GroupExt) Process(ctx *Context, node *Node, source NodeID, signal Signal) Messages {
return nil
2023-07-26 00:18:11 -06:00
}