executor

package
v0.0.0-...-1e17dab Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 25, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ExecResponse

type ExecResponse struct {
	Code   int
	Result []byte
}

func (ExecResponse) String

func (er ExecResponse) String() string

type IJobExecutor

type IJobExecutor interface {
	RunShellJob(task *models.TaskDto) (ExecResponse, error)
	RunGoFunc(task *models.TaskDto) (ExecResponse, error)
	RunHttpRequest(task *models.TaskDto) (ExecResponse, error)
}

func NewJobExecutor

func NewJobExecutor(cfg *setting.Cfg) IJobExecutor

type JobExecutor

type JobExecutor struct {
	// contains filtered or unexported fields
}

func (*JobExecutor) RunGoFunc

func (j *JobExecutor) RunGoFunc(task *models.TaskDto) (ExecResponse, error)

RunGoFunc implements IJobExecutor

func (*JobExecutor) RunHttpRequest

func (*JobExecutor) RunHttpRequest(task *models.TaskDto) (ExecResponse, error)

RunHttpRequest implements IJobExecutor

func (*JobExecutor) RunShellJob

func (j *JobExecutor) RunShellJob(task *models.TaskDto) (ExecResponse, error)

RunShellJob implements IJobExecutor

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL