Documentation ¶
Overview ¶
Package commandGenerator includes the interface and the implementation for generating commands to process.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CommandGenerator ¶
type CommandGenerator interface { // GetNextCommand should return a cmd produced by CommandGenerator GetNextCommand(ctx context.Context) api.Cmd // IsEndOfCommands should return true when there is no more command // to be produced. IsEndOfCommands() bool // GetNumOfRemainingCommands should return total number of commands to be generated GetNumOfRemainingCommands() uint64 }
CommandGenerator is the interface to get commands from an arbitrary source. Implementers of this interface should be able to produce commands when asked until they cannot produce any new command.
func NewLinearCommandGenerator ¶
func NewLinearCommandGenerator(initialCommands []api.Cmd, realCommands []api.Cmd) CommandGenerator
NewLinearCommandGenerator generates a command generator that takes a list of cmds and returns them in order when GetNextCommand is called.
Click to show internal directories.
Click to hide internal directories.