runner

package
v0.0.0-...-3746075 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Job

type Job struct {
	Cmd   string
	Envs  map[string]string
	Input io.Reader
}

Job is unit of work(local or remote command) for runner to run

type LocalRunner

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

func NewLocalRunner

func NewLocalRunner() *LocalRunner

func (*LocalRunner) Close

func (r *LocalRunner) Close() error

func (*LocalRunner) Connect

func (r *LocalRunner) Connect() error

func (*LocalRunner) Debug

func (r *LocalRunner) Debug() bool

func (*LocalRunner) Host

func (r *LocalRunner) Host() string

func (*LocalRunner) ID

func (r *LocalRunner) ID() string

func (*LocalRunner) Promet

func (r *LocalRunner) Promet() string

func (*LocalRunner) Run

func (r *LocalRunner) Run(tr TaskRun) error

func (*LocalRunner) SetDebug

func (r *LocalRunner) SetDebug(debug bool)

func (*LocalRunner) SetPromet

func (r *LocalRunner) SetPromet(promet string)

func (*LocalRunner) Signal

func (r *LocalRunner) Signal(sig os.Signal) error

func (*LocalRunner) Stderr

func (r *LocalRunner) Stderr() io.Reader

func (*LocalRunner) Stdin

func (r *LocalRunner) Stdin() io.WriteCloser

func (*LocalRunner) Stdout

func (r *LocalRunner) Stdout() io.Reader

func (*LocalRunner) Wait

func (r *LocalRunner) Wait() error

type Runner

type Runner interface {
	ID() string
	Connect() error
	Close() error
	Run(tr TaskRun) error
	Wait() error
	Stdin() io.WriteCloser
	Stderr() io.Reader
	Stdout() io.Reader
	Promet() string
	SetPromet(string)
	Host() string
	Debug() bool
	SetDebug(bool)
	Signal(os.Signal) error
}

Runner local or remote runner for taskrun to run

type SSHRunner

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

func NewSSHRunner

func NewSSHRunner(host string, options ...SSHRunnerOption) *SSHRunner

func (*SSHRunner) Close

func (r *SSHRunner) Close() error

func (*SSHRunner) Connect

func (r *SSHRunner) Connect() error

func (*SSHRunner) Debug

func (r *SSHRunner) Debug() bool

func (*SSHRunner) Host

func (r *SSHRunner) Host() string

func (*SSHRunner) ID

func (r *SSHRunner) ID() string

func (*SSHRunner) Promet

func (r *SSHRunner) Promet() string

func (*SSHRunner) Run

func (r *SSHRunner) Run(tr TaskRun) error

func (*SSHRunner) SetDebug

func (r *SSHRunner) SetDebug(debug bool)

func (*SSHRunner) SetPromet

func (r *SSHRunner) SetPromet(promet string)

func (*SSHRunner) Signal

func (r *SSHRunner) Signal(sig os.Signal) error

func (*SSHRunner) Stderr

func (r *SSHRunner) Stderr() io.Reader

func (*SSHRunner) Stdin

func (r *SSHRunner) Stdin() io.WriteCloser

func (*SSHRunner) Stdout

func (r *SSHRunner) Stdout() io.Reader

func (*SSHRunner) Wait

func (r *SSHRunner) Wait() error

type SSHRunnerOption

type SSHRunnerOption func(*SSHRunner)

func WithPassword

func WithPassword(password string) SSHRunnerOption

func WithPort

func WithPort(port uint) SSHRunnerOption

func WithUser

func WithUser(user string) SSHRunnerOption

type TaskRun

type TaskRun interface {
	Command() string
	Environments() map[string]string
	Stdin() io.Reader
	Runners() []Runner
	Run() error
	Sudo() bool
	Name() string
}

TaskRun executable/runnable task

Jump to

Keyboard shortcuts

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