Documentation
¶
Index ¶
- func AddRunningCommand(event slack.MessageEvent, fallbackCommand string) chan bool
- func CountCurrentJobs() int
- func IsBlocked(event slack.MessageEvent) bool
- func NewListCommand(slackClient client.SlackClient) bot.Command
- func NewQueueCommand(slackClient client.SlackClient, log *logrus.Logger) bot.Command
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddRunningCommand ¶
func AddRunningCommand(event slack.MessageEvent, fallbackCommand string) chan bool
AddRunningCommand registers a long running command, e.g. a running Jenkins job or watching a pull request it's doing following magic: - when using "trigger job XXX" and "then reply done" it will execute the "reply done" when the running command was finished - when the server got restarted, the fallbackCommand gets executed todo add a kill chan to kill long running command via command todo improve locking
func CountCurrentJobs ¶ added in v1.6.0
func CountCurrentJobs() int
CountCurrentJobs will return the number of current pending/queued jobs
func IsBlocked ¶
func IsBlocked(event slack.MessageEvent) bool
IsBlocked checks if there is a blocking command registered for this user/channel
func NewListCommand ¶
func NewListCommand(slackClient client.SlackClient) bot.Command
NewListCommand prints the list of all queued commands (blocking commands like running Jenkins jobs)
func NewQueueCommand ¶
NewQueueCommand is able to execute a command when another blocking process is done e.g. have a running jenkins job and using "then reply done!" to get a information later
Types ¶
This section is empty.