docker

package
v0.0.0-...-028f1de Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInconsistentExecProcessState = errors.New("Exec session in the container terminated but process still running")
)

Functions

func CheckDockerProcessor

func CheckDockerProcessor(p *DockerProcessor) error

CheckDockerProcessor performs some pre-checking logics to determine whether Docker runtime should be used for execution.

Types

type DockerProcessor

type DockerProcessor struct {
	TaskId string
	// Fundamental properties of command process
	ContainerId    string
	ContainerName  string // may be filled when only container id specified
	CommandType    string
	CommandContent string
	Timeout        int
	// Additional execution attributes supported by docker
	WorkingDirectory string
	Username         string
	// contains filtered or unexported fields
}

func (*DockerProcessor) Cancel

func (p *DockerProcessor) Cancel()

func (*DockerProcessor) Cleanup

func (p *DockerProcessor) Cleanup(removeScriptFile bool) error

func (*DockerProcessor) ExtraLubanParams

func (p *DockerProcessor) ExtraLubanParams() string

func (*DockerProcessor) PreCheck

func (p *DockerProcessor) PreCheck() (string, error)

PreCheck method of DockerProcessor struct continues to perform pre-checking actions left by CheckDockerProcessor() function.

func (*DockerProcessor) Prepare

func (p *DockerProcessor) Prepare(commandContent string) error

func (*DockerProcessor) SideEffect

func (p *DockerProcessor) SideEffect() error

func (*DockerProcessor) SyncRun

func (p *DockerProcessor) SyncRun(
	stdoutWriter io.Writer,
	stderrWriter io.Writer,
	stdinReader io.Reader) (int, int, error)

Jump to

Keyboard shortcuts

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