Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type OutputInfo ¶
type RunTaskInfo ¶
type RunTaskInfo struct { InstanceId string `json:"instanceId"` CommandType string `json:"type"` TaskId string `json:"taskID"` CommandId string `json:"commandId"` EnableParameter bool `json:"enableParameter"` TimeOut string `json:"timeOut"` CommandName string `json:"commandName"` InvokeVersion int `json:"invokeVersion"` Content string `json:"commandContent"` WorkingDir string `json:"workingDirectory"` Args string `json:"args"` Cronat string `json:"cron"` Username string `json:"username"` Password string `json:"windowsPasswordName"` CreationTime int64 `json:"creationTime"` ContainerId string `json:"containerId"` ContainerName string `json:"containerName"` BuiltinParameters map[string]string `json:"builtInParameter"` Output OutputInfo Repeat RunTaskRepeatType }
type RunTaskRepeatType ¶
type RunTaskRepeatType string
const ( RunTaskOnce RunTaskRepeatType = "Once" RunTaskCron RunTaskRepeatType = "Period" RunTaskNextRebootOnly RunTaskRepeatType = "NextRebootOnly" RunTaskEveryReboot RunTaskRepeatType = "EveryReboot" RunTaskRate RunTaskRepeatType = "Rate" RunTaskAt RunTaskRepeatType = "At" )
type SendFileTaskInfo ¶
type SendFileTaskInfo struct { Content string `json:"content"` ContentType string `json:"contentType"` Destination string `json:"destination"` Group string `json:"group"` Mode string `json:"mode"` Name string `json:"name"` Overwrite bool `json:"overwrite"` Owner string `json:"owner"` Signature string `json:"signature"` TaskID string `json:"taskID"` Timeout int64 `json:"timeout"` Output OutputInfo }
type SessionTaskInfo ¶
type SessionTaskInfo struct { CmdContent string `json:"cmdContent"` Username string `json:"username"` Password string `json:"windowsPasswordName"` SessionId string `json:"channelId"` WebsocketUrl string `json:"websocketUrl"` TargetHost string `json:"targetHost"` PortNumber string `json:"portNumber"` FlowLimit int `json:"flowLimit"` // 最大流量 单位 bps }
type TaskProcessor ¶
type TaskProcessor interface { PreCheck() (invalidParameter string, err error) Prepare(commandContent string) error SyncRun( stdoutWriter io.Writer, stderrWriter io.Writer, stdinReader io.Reader) (exitCode int, status int, err error) Cancel() Cleanup(removeScriptFile bool) error SideEffect() error ExtraLubanParams() string }
Click to show internal directories.
Click to hide internal directories.