Versions in this module Expand all Collapse all v0 v0.3.3 Oct 30, 2024 v0.3.2 Oct 22, 2024 v0.3.1 Oct 8, 2024 v0.3.0 Oct 8, 2024 Changes in this version + const AccessTokenHeaderKey + const DefaultAppName + const DefaultBeatInterval + const DefaultExecutorPort + const DefaultRegisterAddressHttp + const DefaultRegistryGroup + const FailureCode + const SuccessCode + type Executor struct + func Init(opts Options) *Executor + func RunWithDefaultOptions(appName string) (executor *Executor, err error) + func RunWithDefaultOptionsLogger(logger *slog.Logger) (executor *Executor, err error) + func RunWithDefaultOptionsLoggerAndAppName(appName string, logger *slog.Logger) (executor *Executor, err error) + func RunWithOptions(opts Options) (executor *Executor, err error) + func (e *Executor) RegTask(pattern string, task TaskFunc) + func (e *Executor) Run() (err error) + func (e *Executor) Stop() + type IdleBeatReq struct + JobId int64 + type JobHandleResult struct + HandleCode int64 + HandleMsg string + LogDateTim int64 + LogID int64 + type KillRequest struct + JobID int64 + type Options struct + AccessToken string + AdminAddresses string + AppName string + BeatInterval uint64 + ExecutorAddress string + ExecutorPort int64 + LogJsonFormat bool + LogPath string + Logger *slog.Logger + Logretentiondays uint64 + Timeout time.Duration + func (opt *Options) WithAccessToken(accessToken string) *Options + func (opt *Options) WithAdminAddresses(adminAddresses string) *Options + func (opt *Options) WithAppName(appName string) *Options + func (opt *Options) WithExecutorAddress(executorAddress string) *Options + func (opt *Options) WithExecutorPort(executorPort int64) *Options + func (opt *Options) WithLogPath(logPath string) *Options + func (opt *Options) WithLogger(logger *slog.Logger) *Options + func (opt *Options) WithLogretentiondays(logretentiondays uint64) *Options + type Registry struct + RegistryGroup string + RegistryKey string + RegistryValue string + type Resp struct + Code int64 + Content any + Msg interface{} + type RunLogRequest struct + FromLineNum int64 + LogDateTime int64 + LogID int64 + type RunLogRespContent struct + FromLineNum int64 + IsEnd bool + LogContent string + ToLineNum int64 + type RunRequest 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 + Ctx context.Context + EndTime int64 + Id int64 + Name string + Param *RunRequest + StartTime int64 + func (t *Task) Info() string + func (t *Task) Run(callback func(code int64, msg string)) + type TaskFunc func(cxt context.Context, param *RunRequest) error