executors

package
v0.0.0-...-081ecb4 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2020 License: AGPL-3.0 Imports: 26 Imported by: 0

Documentation

Overview

Package executors is a generated GoMock package.

Index

Constants

This section is empty.

Variables

View Source
var ErrExecutorFail = errors.New("executor failed")

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) (*RunResult, 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, _ *Requirements) 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 {
	Setup(ctx context.Context, req *Requirements) error
	Run(ctx context.Context, name string, args ...string) (*RunResult, 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 Fargate

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

func NewFargate

func NewFargate(log logutil.Log, cfg config.Config, awsSess *session.Session) *Fargate

func (Fargate) Clean

func (f Fargate) Clean()

func (Fargate) CopyFile

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

func (Fargate) Run

func (f Fargate) Run(ctx context.Context, name string, args ...string) (*RunResult, error)

func (*Fargate) SetEnv

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

func (*Fargate) SetWorkDir

func (f *Fargate) SetWorkDir(wd string)

func (*Fargate) Setup

func (f *Fargate) Setup(ctx context.Context, req *Requirements) error

func (Fargate) WithEnv

func (f Fargate) WithEnv(k, v string) Executor

func (Fargate) WithWorkDir

func (f Fargate) WithWorkDir(wd string) Executor

func (Fargate) WorkDir

func (f Fargate) WorkDir() string

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, src string) error

CopyFile mocks base method

func (*MockExecutor) EXPECT

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) (*RunResult, error)

Run mocks base method

func (*MockExecutor) SetEnv

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

SetEnv mocks base method

func (*MockExecutor) Setup

func (m *MockExecutor) Setup(ctx context.Context, req *Requirements) error

Setup mocks base method

func (*MockExecutor) WithEnv

func (m *MockExecutor) WithEnv(k, 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(ctx, dst, src interface{}) *gomock.Call

CopyFile indicates an expected call of CopyFile

func (*MockExecutorMockRecorder) Run

func (mr *MockExecutorMockRecorder) Run(ctx, name interface{}, args ...interface{}) *gomock.Call

Run indicates an expected call of Run

func (*MockExecutorMockRecorder) SetEnv

func (mr *MockExecutorMockRecorder) SetEnv(k, v interface{}) *gomock.Call

SetEnv indicates an expected call of SetEnv

func (*MockExecutorMockRecorder) Setup

func (mr *MockExecutorMockRecorder) Setup(ctx, req interface{}) *gomock.Call

Setup indicates an expected call of Setup

func (*MockExecutorMockRecorder) WithEnv

func (mr *MockExecutorMockRecorder) WithEnv(k, v interface{}) *gomock.Call

WithEnv indicates an expected call of WithEnv

func (*MockExecutorMockRecorder) WithWorkDir

func (mr *MockExecutorMockRecorder) WithWorkDir(wd 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 Requirements

type Requirements struct {
	CPUCount int
	MemoryGB int
}

type RunResult

type RunResult struct {
	StdOut string
	StdErr 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) (*RunResult, error)

func (*TempDirShell) SetWorkDir

func (s *TempDirShell) SetWorkDir(wd string)

func (TempDirShell) Setup

func (s TempDirShell) Setup(_ context.Context, _ *Requirements) error

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