executor

package
v0.0.0-...-a43a839 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2020 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DockerExecutor

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

func NewDockerExecutor

func NewDockerExecutor(name, image, workingDirectory, shell string, args []string, client *docker.Client) *DockerExecutor

func (*DockerExecutor) Close

func (e *DockerExecutor) Close(ctx context.Context) error

func (*DockerExecutor) Name

func (e *DockerExecutor) Name() string

func (*DockerExecutor) Session

func (e *DockerExecutor) Session(ctx context.Context) (Session, error)

type Executor

type Executor interface {
	Name() string
	Session(ctx context.Context) (Session, error)
	Close(ctx context.Context) error
}

type Session

type Session interface {
	Reader() io.Reader
	Writer() io.Writer
	CloseWrite() error
	End(ctx context.Context) (int, error)
}

type ShellExecutor

type ShellExecutor struct {
	Shell            string
	ShellArguments   []string
	WorkingDirectory string
}

func NewShellExecutor

func NewShellExecutor(workingDirectory, shell string, shellArguments []string) *ShellExecutor

func (*ShellExecutor) Close

func (s *ShellExecutor) Close(_ context.Context) error

func (*ShellExecutor) Name

func (s *ShellExecutor) Name() string

func (*ShellExecutor) Session

func (s *ShellExecutor) Session(_ context.Context) (Session, error)

Jump to

Keyboard shortcuts

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