executors

package
v0.0.0-...-993d511 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2019 License: AGPL-3.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Container

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

func NewContainer

func NewContainer(log logutil.Log) (*Container, error)

func (Container) Clean

func (c Container) Clean()

func (Container) CopyFile

func (c Container) CopyFile(ctx context.Context, dst, src string) error

func (Container) Run

func (c Container) Run(ctx context.Context, name string, args ...string) (string, error)

func (*Container) SetEnv

func (e *Container) SetEnv(k, v string)

func (*Container) SetWorkDir

func (c *Container) SetWorkDir(wd string)

func (*Container) Setup

func (c *Container) Setup(ctx context.Context) error

func (Container) WithEnv

func (c Container) WithEnv(k, v string) Executor

func (Container) WithWorkDir

func (c Container) WithWorkDir(wd string) Executor

func (Container) WorkDir

func (c Container) WorkDir() string

type Executor

type Executor interface {
	Run(ctx context.Context, name string, args ...string) (string, error)

	WithEnv(k, v string) Executor
	SetEnv(k, v string)

	WorkDir() string
	WithWorkDir(wd string) Executor

	CopyFile(ctx context.Context, dst, src string) error

	Clean()
}

type MockExecutor

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

MockExecutor is a mock of Executor interface

func NewMockExecutor

func NewMockExecutor(ctrl *gomock.Controller) *MockExecutor

NewMockExecutor creates a new mock instance

func (*MockExecutor) Clean

func (_m *MockExecutor) Clean()

Clean mocks base method

func (*MockExecutor) CopyFile

func (_m *MockExecutor) CopyFile(ctx context.Context, dst string, src string) error

CopyFile mocks base method

func (*MockExecutor) EXPECT

func (_m *MockExecutor) EXPECT() *MockExecutorMockRecorder

EXPECT returns an object that allows the caller to indicate expected use

func (*MockExecutor) Run

func (_m *MockExecutor) Run(ctx context.Context, name string, args ...string) (string, error)

Run mocks base method

func (*MockExecutor) SetEnv

func (_m *MockExecutor) SetEnv(k string, v string)

SetEnv mocks base method

func (*MockExecutor) WithEnv

func (_m *MockExecutor) WithEnv(k string, v string) Executor

WithEnv mocks base method

func (*MockExecutor) WithWorkDir

func (_m *MockExecutor) WithWorkDir(wd string) Executor

WithWorkDir mocks base method

func (*MockExecutor) WorkDir

func (_m *MockExecutor) WorkDir() string

WorkDir mocks base method

type MockExecutorMockRecorder

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

MockExecutorMockRecorder is the mock recorder for MockExecutor

func (*MockExecutorMockRecorder) Clean

func (_mr *MockExecutorMockRecorder) Clean() *gomock.Call

Clean indicates an expected call of Clean

func (*MockExecutorMockRecorder) CopyFile

func (_mr *MockExecutorMockRecorder) CopyFile(arg0, arg1, arg2 interface{}) *gomock.Call

CopyFile indicates an expected call of CopyFile

func (*MockExecutorMockRecorder) Run

func (_mr *MockExecutorMockRecorder) Run(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call

Run indicates an expected call of Run

func (*MockExecutorMockRecorder) SetEnv

func (_mr *MockExecutorMockRecorder) SetEnv(arg0, arg1 interface{}) *gomock.Call

SetEnv indicates an expected call of SetEnv

func (*MockExecutorMockRecorder) WithEnv

func (_mr *MockExecutorMockRecorder) WithEnv(arg0, arg1 interface{}) *gomock.Call

WithEnv indicates an expected call of WithEnv

func (*MockExecutorMockRecorder) WithWorkDir

func (_mr *MockExecutorMockRecorder) WithWorkDir(arg0 interface{}) *gomock.Call

WithWorkDir indicates an expected call of WithWorkDir

func (*MockExecutorMockRecorder) WorkDir

func (_mr *MockExecutorMockRecorder) WorkDir() *gomock.Call

WorkDir indicates an expected call of WorkDir

type RemoteShell

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

func NewRemoteShell

func NewRemoteShell(user, host, keyFilePath string) *RemoteShell

func (RemoteShell) Clean

func (s RemoteShell) Clean()

func (RemoteShell) CopyFile

func (s RemoteShell) CopyFile(ctx context.Context, dst, src string) error

func (RemoteShell) Run

func (s RemoteShell) Run(ctx context.Context, name string, srcArgs ...string) (string, error)

func (*RemoteShell) SetEnv

func (e *RemoteShell) SetEnv(k, v string)

func (*RemoteShell) SetWorkDir

func (s *RemoteShell) SetWorkDir(wd string)

func (*RemoteShell) SetupTempWorkDir

func (s *RemoteShell) SetupTempWorkDir(ctx context.Context) error

func (RemoteShell) WithEnv

func (s RemoteShell) WithEnv(k, v string) Executor

func (RemoteShell) WithWorkDir

func (s RemoteShell) WithWorkDir(wd string) Executor

func (RemoteShell) WorkDir

func (s RemoteShell) WorkDir() string

type TempDirShell

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

func NewTempDirShell

func NewTempDirShell(tag string) (*TempDirShell, error)

func (TempDirShell) Clean

func (s TempDirShell) Clean()

func (TempDirShell) CopyFile

func (s TempDirShell) CopyFile(ctx context.Context, dst, src string) error

func (TempDirShell) Run

func (s TempDirShell) Run(ctx context.Context, name string, args ...string) (string, error)

func (*TempDirShell) SetWorkDir

func (s *TempDirShell) SetWorkDir(wd string)

func (TempDirShell) WithEnv

func (s TempDirShell) WithEnv(k, v string) Executor

func (TempDirShell) WithWorkDir

func (s TempDirShell) WithWorkDir(wd string) Executor

func (TempDirShell) WorkDir

func (s TempDirShell) WorkDir() string

Jump to

Keyboard shortcuts

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