Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AbortCommandType ¶ added in v0.2.37
type AbortCommandType CommandType
AbortCommandType represents the type of command that is to be used for aborting a running task. It differentiates between standard commands and abort commands, allowing different handling.
type CommandExecutor ¶
type CommandExecutor interface { // FetchResult executes the command and returns the result. FetchResult(ctx context.Context) (*task.Result, error) }
CommandExecutor represents an executor for a command.
func DeserializeAbortCommand ¶ added in v0.2.37
func DeserializeAbortCommand(factory CommandFactory, taskContext task.TaskContext) (CommandExecutor, error)
func DeserializeCommand ¶
func DeserializeCommand(factory CommandFactory, taskContext task.TaskContext) (CommandExecutor, error)
DeserializeCommand deserializes a command from the task context using the provided command factory.
type CommandFactory ¶
type CommandFactory interface { // InitCommand initializes and returns a CommandExecutor for the specified command type. // It returns an error if the command type is not supported. InitCommand(commandType CommandType) (CommandExecutor, error) }
CommandFactory represents a factory for creating commands.
type CommandType ¶
type CommandType string
CommandType represents the type of a command.
func AbortCommand ¶ added in v0.2.37
func AbortCommand(command CommandType) CommandType
AbortCommand is a wrapper for executing abort logic for a specified command
type CommandWrapper ¶
type CommandWrapper struct { CommandType CommandType `json:"type"` Properties interface{} }
CommandWrapper represents a wrapper for a command.
Click to show internal directories.
Click to hide internal directories.