Documentation ¶
Index ¶
Constants ¶
View Source
const (
FinishTablePrefix = "FT"
)
Variables ¶
View Source
var ( // ErrRetry从TaskHandler返回指示这次任务应该被重试 ErrRetry = errors.New("retry task") )
View Source
var (
UnmarshalFunc = json.Unmarshal
)
Functions ¶
This section is empty.
Types ¶
type AsyncWorker ¶
type AsyncWorker interface {
RegisterHandler(contract string, event string, handler func(ctx common.TaskContext) error)
}
type AsyncWorkerImpl ¶
type AsyncWorkerImpl struct {
// contains filtered or unexported fields
}
func NewAsyncWorkerImpl ¶
func (*AsyncWorkerImpl) RegisterHandler ¶
func (aw *AsyncWorkerImpl) RegisterHandler(contract string, event string, handler common.TaskHandler)
func (*AsyncWorkerImpl) Start ¶
func (aw *AsyncWorkerImpl) Start() (err error)
func (*AsyncWorkerImpl) Stop ¶
func (aw *AsyncWorkerImpl) Stop()
type TaskContextImpl ¶
type TaskContextImpl struct {
// contains filtered or unexported fields
}
func (*TaskContextImpl) ParseArgs ¶
func (tc *TaskContextImpl) ParseArgs(v interface{}) error
func (*TaskContextImpl) RetryTimes ¶
func (tc *TaskContextImpl) RetryTimes() int
Click to show internal directories.
Click to hide internal directories.