Help us shape the future of Go! Take the 2026 Go Developer Survey

executor

package
v1.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 28, 2023 License: GPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Executor

type Executor struct {
	StatusChan chan model.StatusChangeMessage
	// contains filtered or unexported fields
}

func (*Executor) Cancel

func (e *Executor) Cancel(jobName string, id int) error

Cancel 取消

func (*Executor) Execute

func (e *Executor) Execute(id int, job *model.Job) error

Execute 执行任务

func (*Executor) GetJobStatus added in v1.0.3

func (e *Executor) GetJobStatus(jobName string, jobID int) (model.Status, error)

type ExecutorClient

type ExecutorClient struct {
	QueueChan chan *model.QueueMessage
	// contains filtered or unexported fields
}

func NewExecutorClient

func NewExecutorClient() *ExecutorClient

func (*ExecutorClient) GetJobStatus added in v1.0.3

func (c *ExecutorClient) GetJobStatus(jobName string, jobID int) (model.Status, error)

func (*ExecutorClient) GetStatusChangeChan added in v1.0.3

func (c *ExecutorClient) GetStatusChangeChan() chan model.StatusChangeMessage

func (*ExecutorClient) Main

func (c *ExecutorClient) Main()

type IExecutor

type IExecutor interface {
	// Execute 执行任务
	Execute(id int, job *model.Job) error
	//SendResultToQueue 发送结果到队列
	// SendResultToQueue(job *model.JobDetail)
	Cancel(id int, job *model.Job) error
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL