代码拉取完成,页面将自动刷新
package common_engine
import "time"
type Command interface {
GetCommandParamsOptions() []CommandParamsOption
GetCommandText() string
GetPriority() float64
Handler(*TaskCommand, map[string]CommandResult) (interface{}, error)
GetCommandOption() *CommandOption
}
type CommandOption struct {
Timeout time.Duration
DelayTime time.Duration
RetryTime int
Must *bool // must need params option, nil: ignore ,true: need ,false don't need
StartRange int // specify params range, if StartRange equal 0,it will be ignore
ReferResult []string // refer other command handler result
FilterFunc Filter
}
func NewCommandOption() *CommandOption {
return &CommandOption{
Timeout: 2 * time.Second,
DelayTime: 0,
RetryTime: 0,
}
}
type ParamsType int64
const (
String ParamsType = 1
Int ParamsType = 2
Float ParamsType = 3
Json ParamsType = 4
Link ParamsType = 5
Number ParamsType = 6
File ParamsType = 7
Dir ParamsType = 8
)
type CommandParamsOption struct {
ParamsType ParamsType
Must bool
Multi bool // is multi params
MultiNum int
Suffix *string
Prefix *string
Include *string
Exclude *string
Priority int64
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。