docker

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2019 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RunCmdKey    = "run"
	ExecCmdKey   = "exec"
	BashFlagsKey = "bash"

	ContainerNameKey = "cn"
)
View Source
const (
	Command       = "docker"
	RemoveAction  = "remove"
	RmAction      = "rm"
	ContainerFlag = "container"
	ForceFlag     = "force"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Channel

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

func NewDockerChannel

func NewDockerChannel(channel exec.Channel) *Channel

func (*Channel) GetContainerCpuSet

func (c *Channel) GetContainerCpuSet(ctx context.Context, containerId string) *transport.Response

GetContainerCpuSet

func (*Channel) GetScriptPath

func (c *Channel) GetScriptPath() string

func (*Channel) Run

func (c *Channel) Run(ctx context.Context, script, args string) *transport.Response

type CommandModelSpec

type CommandModelSpec struct {
}

func (*CommandModelSpec) Actions

func (cms *CommandModelSpec) Actions() []exec.ExpActionCommandSpec

func (*CommandModelSpec) Example

func (cms *CommandModelSpec) Example() string

func (*CommandModelSpec) Flags

func (cms *CommandModelSpec) Flags() []exec.ExpFlagSpec

func (*CommandModelSpec) LongDesc

func (cms *CommandModelSpec) LongDesc() string

func (*CommandModelSpec) Name

func (cms *CommandModelSpec) Name() string

func (*CommandModelSpec) PreExecutor

func (cms *CommandModelSpec) PreExecutor() exec.PreExecutor

func (*CommandModelSpec) ShortDesc

func (cms *CommandModelSpec) ShortDesc() string

type PreExecutor

type PreExecutor struct {
	DockerChannel *Channel
}

func NewPreExecutor

func NewPreExecutor(channel exec.Channel) *PreExecutor

func (*PreExecutor) CpuPreExec

func (*PreExecutor) CpuPreExec(channel *Channel, containerId string) func(ctx context.Context) (exec.Channel, context.Context, error)

CpuPreExec: add necessary args to context before run action command channel: k8s channel or local channel

func (*PreExecutor) NetworkPreExec

func (*PreExecutor) NetworkPreExec(channel *Channel, containerId string) func(ctx context.Context) (exec.Channel, context.Context, error)

NetworkPreExec

func (*PreExecutor) PreExec

func (pe *PreExecutor) PreExec(cmdName, parentCmdName string, flags map[string]string) func(ctx context.Context) (exec.Channel, context.Context, error)

func (*PreExecutor) ProcessPreExec

func (*PreExecutor) ProcessPreExec(channel *Channel, containerId string) func(ctx context.Context) (exec.Channel, context.Context, error)

ProcessPreExec

Jump to

Keyboard shortcuts

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