executor

package
Version: v1.9.0 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2020 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateExecutor

func CreateExecutor(typeName string, param map[string]interface{}) (interface{}, error)

CreateExecutor create a new executor

Types

type HTTPRemote

type HTTPRemote struct {
	util.BaseLogger
	Host    string
	Timeout time.Duration
	Secret  string
	DataDir string
}

HTTPRemote is an executor which runs jobs on the remote server

func (*HTTPRemote) Execute

func (exe *HTTPRemote) Execute(param map[string]interface{}) (map[string]interface{}, error)

Execute will run job on the remote server

type Local

type Local struct {
	util.ExeGit
}

Local is an executor which runs jobs locally

func (*Local) Execute

func (exe *Local) Execute(param map[string]interface{}) (map[string]interface{}, error)

Execute will execute job locally

type None

type None struct {
}

None is a runner just do nothing

func (*None) Execute

func (exe *None) Execute(param map[string]interface{}) (map[string]interface{}, error)

Execute will do nothing

type Print

type Print struct {
	util.BaseLogger
}

Print is a runner just print the param

func (*Print) Execute

func (exe *Print) Execute(param map[string]interface{}) (map[string]interface{}, error)

Execute will print the param

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL