job

package
v0.0.0-...-80b3c92 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2020 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	//命令行模式
	CommandLineJob = 1
	//HTTP模式
	HttpJob = 2
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CommandLineHandler

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

func (*CommandLineHandler) Run

func (cli *CommandLineHandler) Run() Result

type HttpHandler

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

func (*HttpHandler) Run

func (http *HttpHandler) Run() Result

type Job

type Job interface {
	Run() Result
}

定义Job接口

func NewJob

func NewJob(task *types.Task) Job

构造一个Job独享

type Result

type Result struct {
	Content string
	Err     error
}

返回执行结果

Jump to

Keyboard shortcuts

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