Documentation ¶
Index ¶
- type Config
- type Engine
- type Hub
- type Module
- type UnimplementedModule
- func (u *UnimplementedModule) Config() any
- func (u *UnimplementedModule) Init(*Hub) error
- func (u *UnimplementedModule) Load(*Hub) error
- func (u *UnimplementedModule) Name() string
- func (u *UnimplementedModule) PostInit(*Hub) error
- func (u *UnimplementedModule) PreInit(*Hub) error
- func (u *UnimplementedModule) Start(*Hub) error
- func (u *UnimplementedModule) Stop(wg *sync.WaitGroup, _ context.Context) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Engine ¶
type Engine struct { Ctx context.Context Cancel context.CancelFunc inject.Injector // contains filtered or unexported fields }
func (*Engine) StartModule ¶
type Hub ¶
type Hub struct { inject.Injector Log *zap.SugaredLogger }
type UnimplementedModule ¶
type UnimplementedModule struct { }
UnimplementedModule 由于Module接口中的方法除Name外都是可选的,所以这里提供一个默认实现,方便开发者只实现需要的方法
func (*UnimplementedModule) Config ¶
func (u *UnimplementedModule) Config() any
func (*UnimplementedModule) Init ¶
func (u *UnimplementedModule) Init(*Hub) error
func (*UnimplementedModule) Load ¶
func (u *UnimplementedModule) Load(*Hub) error
func (*UnimplementedModule) Name ¶
func (u *UnimplementedModule) Name() string
func (*UnimplementedModule) PostInit ¶
func (u *UnimplementedModule) PostInit(*Hub) error
func (*UnimplementedModule) PreInit ¶
func (u *UnimplementedModule) PreInit(*Hub) error
func (*UnimplementedModule) Start ¶
func (u *UnimplementedModule) Start(*Hub) error
Click to show internal directories.
Click to hide internal directories.