executor

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2024 License: GPL-3.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExecutorIsValid

func ExecutorIsValid(name string) bool

func Register

func Register(name string, register Creator)

Types

type CommandExecutor

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

func (*CommandExecutor) Kill

func (e *CommandExecutor) Kill(sig os.Signal) error

func (*CommandExecutor) Run

func (e *CommandExecutor) Run() error

func (*CommandExecutor) SetStderr

func (e *CommandExecutor) SetStderr(out io.Writer)

func (*CommandExecutor) SetStdout

func (e *CommandExecutor) SetStdout(out io.Writer)

type Creator

type Creator func(ctx context.Context, step *dag.Step) (Executor, error)

type DockerExecutor

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

func (*DockerExecutor) Kill

func (e *DockerExecutor) Kill(sig os.Signal) error

func (*DockerExecutor) Run

func (e *DockerExecutor) Run() error

func (*DockerExecutor) SetStderr

func (e *DockerExecutor) SetStderr(out io.Writer)

func (*DockerExecutor) SetStdout

func (e *DockerExecutor) SetStdout(out io.Writer)

type Executor

type Executor interface {
	SetStdout(out io.Writer)
	SetStderr(out io.Writer)
	Kill(sig os.Signal) error
	Run() error
}

func CreateCommandExecutor

func CreateCommandExecutor(ctx context.Context, step *dag.Step) (Executor, error)

func CreateDockerExecutor

func CreateDockerExecutor(ctx context.Context, step *dag.Step) (Executor, error)

func CreateExecutor

func CreateExecutor(ctx context.Context, step *dag.Step) (Executor, error)

func CreateHTTPExecutor

func CreateHTTPExecutor(ctx context.Context, step *dag.Step) (Executor, error)

func CreateJqExecutor

func CreateJqExecutor(ctx context.Context, step *dag.Step) (Executor, error)

func CreateMailExecutor

func CreateMailExecutor(ctx context.Context, step *dag.Step) (Executor, error)

func CreateSSHExecutor

func CreateSSHExecutor(ctx context.Context, step *dag.Step) (Executor, error)

func CreateTimerExecutor added in v1.0.3

func CreateTimerExecutor(ctx context.Context, step *dag.Step) (Executor, error)

type HTTPConfig

type HTTPConfig struct {
	Timeout     int               `json:"timeout"`
	Headers     map[string]string `json:"headers"`
	QueryParams map[string]string `json:"query"`
	Body        string            `json:"body"`
	Silent      bool              `json:"silent"`
}

type HTTPExecutor

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

func (*HTTPExecutor) Kill

func (e *HTTPExecutor) Kill(sig os.Signal) error

func (*HTTPExecutor) Run

func (e *HTTPExecutor) Run() error

func (*HTTPExecutor) SetStderr

func (e *HTTPExecutor) SetStderr(out io.Writer)

func (*HTTPExecutor) SetStdout

func (e *HTTPExecutor) SetStdout(out io.Writer)

type JqConfig

type JqConfig struct {
	Raw bool `mapstructure:"raw"`
}

type JqExecutor

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

func (*JqExecutor) Kill

func (e *JqExecutor) Kill(sig os.Signal) error

func (*JqExecutor) Run

func (e *JqExecutor) Run() error

func (*JqExecutor) SetStderr

func (e *JqExecutor) SetStderr(out io.Writer)

func (*JqExecutor) SetStdout

func (e *JqExecutor) SetStdout(out io.Writer)

type MailConfig

type MailConfig struct {
	From    string `mapstructure:"from"`
	To      string `mapstructure:"to"`
	Subject string `mapstructure:"subject"`
	Message string `mapstructure:"message"`
}

type MailExecutor

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

func (*MailExecutor) Kill

func (e *MailExecutor) Kill(sig os.Signal) error

func (*MailExecutor) Run

func (e *MailExecutor) Run() error

func (*MailExecutor) SetStderr

func (e *MailExecutor) SetStderr(out io.Writer)

func (*MailExecutor) SetStdout

func (e *MailExecutor) SetStdout(out io.Writer)

type SSHConfig

type SSHConfig struct {
	User                  string
	IP                    string
	Port                  int
	Key                   string
	StrictHostKeyChecking bool
}

type SSHExecutor

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

func (*SSHExecutor) Kill

func (e *SSHExecutor) Kill(sig os.Signal) error

func (*SSHExecutor) Run

func (e *SSHExecutor) Run() error

func (*SSHExecutor) SetStderr

func (e *SSHExecutor) SetStderr(out io.Writer)

func (*SSHExecutor) SetStdout

func (e *SSHExecutor) SetStdout(out io.Writer)

type TimerExecutor added in v1.0.3

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

TimerExecutor wraps a CommandExecutor to add execution timing

func (*TimerExecutor) Kill added in v1.0.3

func (e *TimerExecutor) Kill(sig os.Signal) error

func (*TimerExecutor) Run added in v1.0.3

func (e *TimerExecutor) Run() error

func (*TimerExecutor) SetStderr added in v1.0.3

func (e *TimerExecutor) SetStderr(out io.Writer)

func (*TimerExecutor) SetStdout added in v1.0.3

func (e *TimerExecutor) SetStdout(out io.Writer)

Jump to

Keyboard shortcuts

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