1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-30 00:00:11 +01:00
VILLASnode/go/pkg/nodes/registry.go

23 lines
398 B
Go

package nodes
var (
goNodeTypes = map[string]NodeType{}
)
type NodeType struct {
Constructor NodeConstructor
Flags int
Description string
}
func RegisterNodeType(name string, desc string, ctor NodeConstructor, flags int) {
goNodeTypes[name] = NodeType{
Constructor: ctor,
Flags: flags,
Description: desc,
}
}
func NodeTypes() map[string]NodeType {
return goNodeTypes
}