Documentation ¶
Index ¶
- Constants
- func CpContainerFile(ctx context.Context, cr, containerID, src, dst string) error
- func ExecBackGroundCommon(ctx context.Context, cr, cId, cmd string) error
- func ExecCommonWithNS(ctx context.Context, cr, cId, cmd string, ns []string) (string, error)
- func ExecContainer(ctx context.Context, cr, containerID string, namespaces []string, cmd string, ...) (string, error)
- func RunBashCmdWithOutput(ctx context.Context, cmd string) (string, error)
- func RunBashCmdWithoutOutput(ctx context.Context, cmd string) error
- func StartBashCmd(ctx context.Context, cmd string) error
- func StartBashCmdAndWaitByUser(ctx context.Context, cmd, user string) error
- func StartBashCmdAndWaitPid(ctx context.Context, cmd string, timeoutSec int) (int, error)
- func StartSleepRecover(ctx context.Context, sleepTime int64, uid string) error
- func SupportCmd(cmd string) bool
- func WaitCommonWithNS(ctx context.Context, cr, cId, cmd string, ns []string) error
- type CmdExecutor
Constants ¶
View Source
const ( InjectCheckInterval = time.Millisecond * 200 ExecWait = "wait" ExecStart = "start" ExecRun = "run" )
Variables ¶
This section is empty.
Functions ¶
func CpContainerFile ¶
func ExecBackGroundCommon ¶
func ExecCommonWithNS ¶
func ExecContainer ¶
func RunBashCmdWithOutput ¶
func StartBashCmdAndWaitPid ¶
func StartSleepRecover ¶
func SupportCmd ¶
Types ¶
type CmdExecutor ¶
type CmdExecutor struct { ContainerId string ContainerRuntime string ContainerNs []string ToolKey string Method string Fault string Args string }
func (*CmdExecutor) GetTargetPid ¶
func (e *CmdExecutor) GetTargetPid(ctx context.Context) (int, error)
func (*CmdExecutor) StartCmd ¶
func (e *CmdExecutor) StartCmd(ctx context.Context, cmd string) error
func (*CmdExecutor) StartCmdAndWait ¶
func (e *CmdExecutor) StartCmdAndWait(ctx context.Context, cmd string) error
Click to show internal directories.
Click to hide internal directories.