actuator

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2019 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunPipeline

func RunPipeline(ctx context.Context, pipeline *models.Pipeline, resChan chan *models.Result)

执行流水线

Types

type Contract

type Contract interface {
	Exec(ctx context.Context) *models.TaskRecords
}

type Hook

type Hook struct {
}

func (*Hook) Exec

func (actuator *Hook) Exec(ctx context.Context, result chan *models.Result)

type Http

type Http struct{}

func (*Http) Exec

func (actuator *Http) Exec(ctx context.Context, result chan *models.Result)

type Mail

type Mail struct {
}

func (*Mail) Exec

func (actuator *Mail) Exec(ctx context.Context, result chan *models.Result)

type Shell

type Shell struct {
	User    string
	Env     []string
	Dir     string
	Command string
}

func NewShell

func NewShell(username, dir string, env []string) *Shell

创建一个 Shell 执行器

func (*Shell) Exec

func (actuator *Shell) Exec(ctx context.Context) *models.TaskRecords

执行 Shell 任务

Jump to

Keyboard shortcuts

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