Documentation
¶
Index ¶
- func RunCommand(c Command, taskSet []tasks.Task, wg *sync.WaitGroup) (err error)
- type Command
- func (c *Command) Copy() (newCommand Command)
- func (c *Command) Execute() (err error)
- func (c *Command) GetSequence() int64
- func (c Command) GetSlotNumber() int64
- func (c *Command) Prepare(tasks []tasks.Task) (err error)
- func (c *Command) Print(file *os.File, str string)
- func (c *Command) SequenceIncr()
- func (c *Command) SequenceReset()
- func (c *Command) SetConcurrency(concurrency int64)
- type Config
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Command ¶
type Command struct { Input string Command string Slots int64 Config Config Sequence int64 Empty bool }
Command a command
func NewCommand ¶
func NewCommand(value string, taskListSet *tasks.TaskListSet, config Config) Command
NewCommand create a new command struct instance
func (*Command) Copy ¶
Copy get copy of a command to avoid overwriting the source copy of the Command attribute
func (*Command) Execute ¶
Execute execute a shell command For now, returns the stdout and stderr. Sends stdout and stderr to system stdout and stderr. func (c *Command) Execute() (stdout, stdErr string, err error) {
func (*Command) GetSequence ¶
GetSequence get lock free sequence value
func (Command) GetSlotNumber ¶
GetSlotNumber get slot number based on sequence and concurrency
func (*Command) SequenceIncr ¶
func (c *Command) SequenceIncr()
SequenceIncr increment sequence without lock
func (*Command) SetConcurrency ¶
SetConcurrency allow concurrency to be set
Click to show internal directories.
Click to hide internal directories.