Versions in this module Expand all Collapse all v0 v0.6.3 Apr 19, 2021 v0.6.2 Apr 19, 2021 Changes in this version type Executor + RegistryRemove func() v0.6.1 Apr 19, 2021 Changes in this version + var DefaultExecutorPort = "9999" + var DefaultRegistryKey = "golang-jobs" + func Int64ToStr(i int64) string + func StrToInt64(str string) int64 + type Conf struct + AccessToken string + ExecutorPort string + RegistryKey string + ServerAddr string + type ExecuteResult struct + Code int64 + Msg interface{} + type Executor interface + Init func(...Option) + KillTask func(writer http.ResponseWriter, request *http.Request) + LogHandler func(handler LogHandler) + RegTask func(pattern string, task TaskFunc) + Run func() error + RunTask func(writer http.ResponseWriter, request *http.Request) + SetLogger func(log Logger) + TaskLog func(writer http.ResponseWriter, request *http.Request) + func New(c Conf) Executor + func NewExecutor(opts ...Option) Executor + type LogFunc func(req LogReq, res *LogRes) []byte + type LogHandler func(req *LogReq) *LogRes + type LogReq struct + FromLineNum int + LogDateTim int64 + LogID int64 + type LogRes struct + Code int64 + Content LogResContent + Msg string + type LogResContent struct + FromLineNum int + IsEnd bool + LogContent string + ToLineNum int + type Logger interface + Errorf func(format string, a ...interface{}) + Fatalf func(format string, a ...interface{}) + Infof func(format string, a ...interface{}) + type Option func(o *Options) + func AccessToken(token string) Option + func ExecutorIp(ip string) Option + func ExecutorPort(port string) Option + func RegistryKey(registryKey string) Option + func ServerAddr(addr string) Option + func SetLogger(l Logger) Option + type Options struct + AccessToken string + ExecutorIp string + ExecutorPort string + LogDir string + RegistryKey string + ServerAddr string + Timeout time.Duration + type Registry struct + RegistryGroup string + RegistryKey string + RegistryValue string + type RunReq struct + BroadcastIndex int64 + BroadcastTotal int64 + ExecutorBlockStrategy string + ExecutorHandler string + ExecutorParams string + ExecutorTimeout int64 + GlueSource string + GlueType string + GlueUpdatetime int64 + JobID int64 + LogDateTime int64 + LogID int64 + type Task struct + Cancel context.CancelFunc + EndTime int64 + Ext context.Context + Id int64 + Name string + Param *RunReq + StartTime int64 + func (t *Task) Info() string + func (t *Task) Run(callback func(code int64, msg string)) + type TaskFunc func(cxt context.Context, param *RunReq) string