Documentation ¶
Index ¶
- func IOctl(fd int, request, arg uintptr) error
- type LinuxBashShell
- func (lsh *LinuxBashShell) IOctl(fd int, request, arg uintptr) error
- func (lsh *LinuxBashShell) JustRun(ctx context.Context, cmd string) error
- func (lsh *LinuxBashShell) JustRunDetach(ctx context.Context, cmd string) error
- func (lsh *LinuxBashShell) ReadFD(fd int, p []byte) (n int, err error)
- func (lsh *LinuxBashShell) RunAndWaitResult(ctx context.Context, cmd string) ([]byte, error)
- func (lsh *LinuxBashShell) RunWithInteractive(ctx context.Context, cmd string, in, out chan []byte) error
- type ShellEngine
- type WindowsPowerShell
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type LinuxBashShell ¶
type LinuxBashShell struct {
// contains filtered or unexported fields
}
func InitLinuxBashShell ¶
func InitLinuxBashShell(rulex typex.RuleX) *LinuxBashShell
func (*LinuxBashShell) JustRun ¶
func (lsh *LinuxBashShell) JustRun(ctx context.Context, cmd string) error
func (*LinuxBashShell) JustRunDetach ¶
func (lsh *LinuxBashShell) JustRunDetach(ctx context.Context, cmd string) error
func (*LinuxBashShell) ReadFD ¶
func (lsh *LinuxBashShell) ReadFD(fd int, p []byte) (n int, err error)
func (*LinuxBashShell) RunAndWaitResult ¶
func (*LinuxBashShell) RunWithInteractive ¶
type ShellEngine ¶
type ShellEngine interface { JustRun(ctx context.Context, cmd string) error // 一次性指令,不等返回 JustRunDetach(ctx context.Context, cmd string) error // 分离进程 RunAndWaitResult(ctx context.Context, cmd string) ([]byte, error) // 运行指令然后等待结果 RunWithInteractive(ctx context.Context, cmd string, in, out chan []byte) error // 交互运行,自带stdin ReadFD(fd int, p []byte) (n int, err error) // Syscall read IOctl(fd int, request, arg uintptr) error // UNIX ioctl }
* * 脚本执行引擎 *
type WindowsPowerShell ¶
type WindowsPowerShell struct {
// contains filtered or unexported fields
}
func InitWindowsPowerShell ¶
func InitWindowsPowerShell(rulex typex.RuleX) *WindowsPowerShell
Click to show internal directories.
Click to hide internal directories.