Documentation
¶
Index ¶
- Constants
- func GetNodeFullName(module string, component string) string
- func ParseFullName(fullName string) (module string, component string, err error)
- type Component
- type ComponentInfo
- type Emitter
- type HTTPService
- type Handler
- type Info
- type ListenAddressGetter
- type NodePort
- type Position
- type StatefulComponent
Constants ¶
View Source
const (
SaveStatePort string = "_save-state"
GetStatePort string = "_get-state"
SettingsPort string = "_settings"
StatusPort string = "_status"
)
Variables ¶
This section is empty.
Functions ¶
func GetNodeFullName ¶
func GetNodeFullName(module string, component string) string
func ParseFullName ¶
func ParseFullName(fullName string) (module string, component string, err 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
}
func (ComponentInfo) GetResourceName ¶
func (c ComponentInfo) GetResourceName() string
type HTTPService ¶
type HTTPService interface {
HTTPService(getter ListenAddressGetter)
}
type Info ¶
type Info struct {
Name string
VersionID string // if module's build is registered
Version string
Addr string //listed address
}
func (Info) GetMajorName ¶
func (i Info) GetMajorName() string
func (Info) GetMajorNameSanitised ¶
func (i Info) GetMajorNameSanitised() string
type ListenAddressGetter ¶
type ListenAddressGetter func(port int) (public string, err error)
type NodePort ¶
type NodePort struct {
Source bool
Status bool
Settings bool
Position Position
Name string
Label string
Configuration interface{}
}
type StatefulComponent ¶
type StatefulComponent interface {
GetState() ([]byte, error)
SetState(state []byte) error
}
StatefulComponent WIP
Click to show internal directories.
Click to hide internal directories.