Documentation ¶
Index ¶
- Constants
- type Channel
- type CommandModelSpec
- func (cms *CommandModelSpec) Actions() []exec.ExpActionCommandSpec
- func (cms *CommandModelSpec) Example() string
- func (cms *CommandModelSpec) Flags() []exec.ExpFlagSpec
- func (cms *CommandModelSpec) LongDesc() string
- func (cms *CommandModelSpec) Name() string
- func (cms *CommandModelSpec) PreExecutor() exec.PreExecutor
- func (cms *CommandModelSpec) ShortDesc() string
- type PreExecutor
- func (*PreExecutor) CpuPreExec(channel *Channel, containerId string) func(ctx context.Context) (exec.Channel, context.Context, error)
- func (*PreExecutor) NetworkPreExec(channel *Channel, containerId string) func(ctx context.Context) (exec.Channel, context.Context, error)
- func (pe *PreExecutor) PreExec(cmdName, parentCmdName string, flags map[string]string) func(ctx context.Context) (exec.Channel, context.Context, error)
- func (*PreExecutor) ProcessPreExec(channel *Channel, containerId string) func(ctx context.Context) (exec.Channel, context.Context, error)
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 (*Channel) GetContainerCpuSet ¶
GetContainerCpuSet
func (*Channel) GetScriptPath ¶
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
Click to show internal directories.
Click to hide internal directories.