Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Modules = map[string]*ModuleEntry{}
Functions ¶
func PostMessage ¶
func PostMessage(sender *ModuleEntry, target *ModuleEntry, msg *XPostMessage) error
Types ¶
type MainEntry ¶
type MainEntry struct {
Module *ModuleEntry
}
var Main *MainEntry
func NewMainEntry ¶
func NewMainEntry() *MainEntry
type ModuleEntry ¶
type ModuleEntry struct { Key string Url string Tags *xtags UsedBy *usedBy Alias string OnPostMessage func(msg *XPostMessage) error OnRequest func(*XReqRes) error }
func GetModuleEntry ¶
func GetModuleEntry(key string) *ModuleEntry
func ListAllModuleEntrys ¶
func ListAllModuleEntrys() []*ModuleEntry
func NewModuleEntry ¶
func NewModuleEntry(key string, tags ...string) *ModuleEntry
func (*ModuleEntry) PostMessage ¶
func (me *ModuleEntry) PostMessage(target *ModuleEntry, msg *XPostMessage) error
type XPostMessage ¶
type XPostMessage struct { Sender *ModuleEntry Target *ModuleEntry Key string // Key of the message Path string // Path of the message Args []string // Arguments for the message Message string }
func NewPostMessage ¶
func NewPostMessage(key string, args ...string) *XPostMessage
type XRequest ¶
type XRequest struct { Sender *ModuleEntry Target *ModuleEntry Key string // Key of the request Path string // Path of the request Args []string // Arguments for the request Message string // Message for the request }
func NewRequest ¶
type XResponse ¶
type XResponse struct { Sender *ModuleEntry Target *ModuleEntry Key string // Key of the response Path string // Path of the response Args []string // Arguments for the response Message string // Message for the response }
func NewResponse ¶
func SendRequest ¶
func SendRequest(sender *ModuleEntry, target *ModuleEntry, req *XRequest) (*XResponse, error)
Click to show internal directories.
Click to hide internal directories.