Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewCommandsResolver ¶
NewCommandsResolver returns a new Resolver that returns operations to execute "juju run" commands.
The returned resolver's NextOp method will return operations to execute run commands whenever the remote state's "Commands" is non-empty, by taking the first ID in the sequence and fetching the command arguments from the Commands interface passed into this function. When the command execution operation is committed, the ID of the command is passed to the "commandCompleted" callback.
Types ¶
type Commands ¶
type Commands interface { // AddCommand adds the given command arguments and response function // and returns a unique identifier. AddCommand(operation.CommandArgs, operation.CommandResponseFunc) string // GetCommand returns the command arguments and response function // with the specified ID, as registered in AddCommand. GetCommand(id string) (operation.CommandArgs, operation.CommandResponseFunc) // RemoveCommand removes the command arguments and response function // associated with the specified ID. RemoveCommand(id string) }
Commands is an interface providing a means of storing and retrieving arguments for running commands.
func NewCommands ¶
func NewCommands() Commands
Click to show internal directories.
Click to hide internal directories.