Documentation
¶
Index ¶
- func RegisterModule[F any, C any](name string, ...)
- type AnModule
- type AnWare
- func (m *AnWare) AutoLoadModules(staticData aninterface.StaticData, configData any, flags any, ...)
- func (m *AnWare) Broadcast(msg AnWareEvent)
- func (m *AnWare) LoopOfAnWare(msg AnWareEvent)
- func (m *AnWare) Run()
- func (m *AnWare) Send(msg AnWareEvent)
- func (m *AnWare) SendSync(source string, target string, msgType string, data any) (any, error)
- func (m *AnWare) Shutdown()
- type AnWareEvent
- type AnWareReply
- type GenericModuleConstructor
- type ModuleFactory
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterModule ¶
func RegisterModule[F any, C any]( name string, constructor func(local aninterface.StaticData, config C, flags F, logger aninterface.AnLogger) AnModule, )
Types ¶
type AnWare ¶
type AnWare struct {
Logger aninterface.AnLogger
// contains filtered or unexported fields
}
func NewAnWare ¶
func NewAnWare(context context.Context, cancel context.CancelFunc, logger aninterface.AnLogger) *AnWare
func (*AnWare) AutoLoadModules ¶
func (m *AnWare) AutoLoadModules(staticData aninterface.StaticData, configData any, flags any, logger aninterface.AnLogger)
func (*AnWare) Broadcast ¶
func (m *AnWare) Broadcast(msg AnWareEvent)
func (*AnWare) LoopOfAnWare ¶
func (m *AnWare) LoopOfAnWare(msg AnWareEvent)
func (*AnWare) Send ¶
func (m *AnWare) Send(msg AnWareEvent)
type AnWareEvent ¶
type AnWareEvent struct {
Source string
Target string
Type string
Data any
ReplyTo chan AnWareReply
}
type AnWareReply ¶ added in v1.0.4
type GenericModuleConstructor ¶
func (GenericModuleConstructor[F, C]) Build ¶
func (g GenericModuleConstructor[F, C]) Build(local aninterface.StaticData, config any, flags any, logger aninterface.AnLogger) AnModule
type ModuleFactory ¶
type ModuleFactory interface {
Build(local aninterface.StaticData, config any, flags any, logger aninterface.AnLogger) AnModule
}
Click to show internal directories.
Click to hide internal directories.