Documentation
¶
Index ¶
- func NewModule(ctx fiberhouse.IApplicationContext) fiberhouse.ModuleRegister
- func NewTaskAsync(ctx fiberhouse.IApplicationContext) fiberhouse.TaskRegister
- type Module
- type TaskAsync
- func (ta *TaskAsync) AddTaskHandlerToMap(pattern string, handler func(context.Context, *asynq.Task) error)
- func (ta *TaskAsync) GetContext() fiberhouse.IApplicationContext
- func (ta *TaskAsync) GetName() string
- func (ta *TaskAsync) GetTaskDispatcher() (*fiberhouse.TaskDispatcher, error)
- func (ta *TaskAsync) GetTaskHandlerMap() map[string]func(context.Context, *asynq.Task) error
- func (ta *TaskAsync) GetTaskWorker(key string) (*fiberhouse.TaskWorker, error)
- func (ta *TaskAsync) RegisterTaskDispatcherToContainer()
- func (ta *TaskAsync) RegisterTaskServerToContainer()
- func (ta *TaskAsync) SetName(name string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewModule ¶
func NewModule(ctx fiberhouse.IApplicationContext) fiberhouse.ModuleRegister
func NewTaskAsync ¶
func NewTaskAsync(ctx fiberhouse.IApplicationContext) fiberhouse.TaskRegister
Types ¶
type Module ¶
type Module struct {
Ctx fiberhouse.IApplicationContext
// contains filtered or unexported fields
}
Module struct
func (*Module) GetContext ¶
func (m *Module) GetContext() fiberhouse.IApplicationContext
GetContext get module context
func (*Module) RegisterModuleRouteHandlers ¶
func (m *Module) RegisterModuleRouteHandlers(cs fiberhouse.CoreStarter)
RegisterModuleRouteHandlers 注册模块(子系统)级路由处理器
func (*Module) RegisterSwagger ¶
func (m *Module) RegisterSwagger(cs fiberhouse.CoreStarter)
RegisterSwagger 注册swagger
type TaskAsync ¶
type TaskAsync struct {
Ctx fiberhouse.IApplicationContext
// contains filtered or unexported fields
}
TaskAsync 任务注册器
func (*TaskAsync) AddTaskHandlerToMap ¶
func (ta *TaskAsync) AddTaskHandlerToMap(pattern string, handler func(context.Context, *asynq.Task) error)
AddTaskHandlerToMap 添加新的任务名和任务处理器到map
func (*TaskAsync) GetContext ¶
func (ta *TaskAsync) GetContext() fiberhouse.IApplicationContext
GetContext 获取应用上下文
func (*TaskAsync) GetTaskDispatcher ¶
func (ta *TaskAsync) GetTaskDispatcher() (*fiberhouse.TaskDispatcher, error)
GetTaskDispatcher 从容器获取任务分发器实例
func (*TaskAsync) GetTaskHandlerMap ¶
GetTaskHandlerMap 获取任务处理器map
func (*TaskAsync) GetTaskWorker ¶
func (ta *TaskAsync) GetTaskWorker(key string) (*fiberhouse.TaskWorker, error)
GetTaskWorker 从容器获取任务工作服务器实例
func (*TaskAsync) RegisterTaskDispatcherToContainer ¶
func (ta *TaskAsync) RegisterTaskDispatcherToContainer()
RegisterKeyTaskDispatcher 注册异步任务分发器初始化器到全局容器
func (*TaskAsync) RegisterTaskServerToContainer ¶
func (ta *TaskAsync) RegisterTaskServerToContainer()
RegisterKeyTaskServer 注册异步任务服务器/工作器初始化器到全局容器
Click to show internal directories.
Click to hide internal directories.