Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Executor ¶
type Executor interface { Before(param *ExecutorParam) (err error) // 每次执行之前调用 Execute(param *ExecutorParam) (err error) // 执行 After(param *ExecutorParam) (err error) // 每次执行之后调用 }
type ExecutorParam ¶
type ExecutorParam struct { Index int `json:"index"` // 索引号 从 0 开始 WorkerIndex int `json:"workerIndex"` // 执行线程编号 Extend interface{} `json:"extend"` // 扩展 业务自己数据可以放在此处 StartTime time.Time `json:"startTime"` EndTime time.Time `json:"endTime"` BeforeStartTime time.Time `json:"beforeStartTime"` BeforeEndTime time.Time `json:"beforeEndTime"` ExecuteStartTime time.Time `json:"executeStartTime"` ExecuteEndTime time.Time `json:"executeEndTime"` AfterStartTime time.Time `json:"afterStartTime"` AfterEndTime time.Time `json:"afterEndTime"` Error error `json:"error"` // contains filtered or unexported fields }
func (*ExecutorParam) IsStopped ¶
func (this_ *ExecutorParam) IsStopped() bool
func (*ExecutorParam) Stop ¶
func (this_ *ExecutorParam) Stop()
type Task ¶
type Task struct { *Options StartTime time.Time `json:"startTime"` EndTime time.Time `json:"endTime"` Errors []error `json:"errors"` OnStart func() `json:"-"` // DoStart 执行开始 OnEnd func() `json:"-"` // DoEnd 执行结束 OnStop func() `json:"-"` IsStart bool `json:"isStart"` // IsStart 是否启动 IsEnd bool `json:"isEnd"` // IsEnd 是否结束 ExecutorBeforeCount int `json:"executorBeforeCount"` ExecutorExecuteCount int `json:"executorExecuteCount"` ExecutorAfterCount int `json:"executorAfterCount"` ExecutorSuccessCount int `json:"executorSuccessCount"` ExecutorErrorCount int `json:"executorErrorCount"` Metric *metric.Metric `json:"-"` // contains filtered or unexported fields }
Click to show internal directories.
Click to hide internal directories.