Documentation
¶
Index ¶
Constants ¶
View Source
const (
InformerNodeID = "_informer"
PlatformSubjectPattern = "platform.*"
GetManifestSubject = "get_manifest"
PublishModuleSubject = "publish_manifest"
UpdateModuleSubject = "update_manifest"
)
View Source
const (
SaveStatePort string = "_save-state"
GetStatePort string = "_get-state"
ConfigurePort string = "_configure"
RunPort string = "_run"
StopPort string = "_stop"
DestroyPort string = "_destroy"
SettingsPort string = "_settings"
StatusPort string = "_status"
)
Variables ¶
This section is empty.
Functions ¶
func GetComponentID ¶
func GetComponentID(moduleInfo Info, cmpInfo ComponentInfo) (string, error)
Types ¶
type Component ¶
type Component interface {
GetInfo() ComponentInfo
//Handle handles incoming requests
Handle(ctx context.Context, output Handler, port string, message interface{}) error
//Ports gets list of ports
Ports() []NodePort
//Instance creates new instance with default settings
Instance() Component
}
type ComponentInfo ¶
type ComponentInfo struct {
Name string
Description string
Info string
Tags []string
}
type Info ¶
type Info struct {
VersionID string // if module's build is registered
Version string
Name string
}
type NodePort ¶
type NodePort struct {
Source bool
Status bool
Settings bool
Position Position
Name string
Label string
Message interface{}
}
func GetPortByName ¶
func GetPortByName(ports []NodePort, name string) *NodePort
type StatefulComponent ¶
type StatefulComponent interface {
GetState() ([]byte, error)
SetState(state []byte) error
}
StatefulComponent WIP
Click to show internal directories.
Click to hide internal directories.