Documentation ¶
Index ¶
- Variables
- func QueueSendTask(ctx context.Context, svcCtx *svc.ServiceContext, topic string, payload string, ...) error
- func QueueTaskCheck(svcCtx *svc.ServiceContext)
- func QueueTaskClose(ctx context.Context, taskCode string)
- func QueueTaskStatusRunCheck(ctx context.Context, svcCtx *svc.ServiceContext, wait *sync.WaitGroup, ...) error
- func QueueTaskStatusStopCheck(ctx context.Context, svcCtx *svc.ServiceContext, wait *sync.WaitGroup, ...) error
- func Run(svcCtx *svc.ServiceContext)
- func TimingTaskCheck(svcCtx *svc.ServiceContext)
- func TimingTaskStatusRunCheck(ctx context.Context, svcCtx *svc.ServiceContext, wait *sync.WaitGroup, ...) error
- func TimingTaskStatusStopCheck(ctx context.Context, svcCtx *svc.ServiceContext, wait *sync.WaitGroup, ...) error
- type QueueTrigger
Constants ¶
This section is empty.
Variables ¶
View Source
var ( QueueMutex sync.Mutex QueueMap = map[string]*QueueTrigger{} )
Functions ¶
func QueueSendTask ¶
func QueueSendTask(ctx context.Context, svcCtx *svc.ServiceContext, topic string, payload string, po *relationDB.TimedTaskInfo) error
func QueueTaskClose ¶
func QueueTaskStatusRunCheck ¶
func QueueTaskStatusRunCheck(ctx context.Context, svcCtx *svc.ServiceContext, wait *sync.WaitGroup, task *relationDB.TimedTaskInfo) error
需要检查任务是否启动,如果没有启动需要启动
func QueueTaskStatusStopCheck ¶
func QueueTaskStatusStopCheck(ctx context.Context, svcCtx *svc.ServiceContext, wait *sync.WaitGroup, task *relationDB.TimedTaskInfo) error
如果处于运行状态需要停止
func Run ¶
func Run(svcCtx *svc.ServiceContext)
func TimingTaskStatusRunCheck ¶
func TimingTaskStatusRunCheck(ctx context.Context, svcCtx *svc.ServiceContext, wait *sync.WaitGroup, task *relationDB.TimedTaskInfo) error
需要检查任务是否启动,如果没有启动需要启动
func TimingTaskStatusStopCheck ¶
func TimingTaskStatusStopCheck(ctx context.Context, svcCtx *svc.ServiceContext, wait *sync.WaitGroup, task *relationDB.TimedTaskInfo) error
如果处于运行状态需要停止
Types ¶
type QueueTrigger ¶
type QueueTrigger struct { Subs []*nats.Subscription Task *relationDB.TimedTaskInfo }
Click to show internal directories.
Click to hide internal directories.