Documentation
¶
Index ¶
- type Executor
- func (e *Executor) Cancel(id int, job *model2.Job) error
- func (e *Executor) Execute(id int, job *model2.Job) error
- func (e *Executor) FetchJob(name string) (io.Reader, error)
- func (e *Executor) HandlerLog(jobId int)
- func (e *Executor) SendResultToQueue(channel chan model2.StatusChangeMessage, job *model2.JobDetail)
- type ExecutorClient
- type IExecutor
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Executor ¶
type Executor struct {
// contains filtered or unexported fields
}
func (*Executor) SendResultToQueue ¶
func (e *Executor) SendResultToQueue(channel chan model2.StatusChangeMessage, job *model2.JobDetail)
SendResultToQueue 发送结果到队列
type ExecutorClient ¶
type ExecutorClient struct {
// contains filtered or unexported fields
}
func NewExecutorClient ¶
func NewExecutorClient(channel chan model2.QueueMessage, callbackChannel chan model2.StatusChangeMessage, jobService service.IJobService) *ExecutorClient
func (*ExecutorClient) Main ¶
func (c *ExecutorClient) Main()
type IExecutor ¶
type IExecutor interface {
// FetchJob 获取任务
FetchJob(name string) (io.Reader, error)
// Execute 执行任务
Execute(id int, job *model2.Job) error
// HandlerLog 处理日志
HandlerLog(jobId int)
//SendResultToQueue 发送结果到队列
SendResultToQueue(channel chan model2.StatusChangeMessage, jobWrapper *model2.JobDetail)
Cancel(id int, job *model2.Job) error
}
Click to show internal directories.
Click to hide internal directories.