Documentation ¶
Index ¶
- func IsEmpty(i interface{}) bool
- func NewMail(c *MailConfig) core.Middleware
- func NewOverlap(c *OverlapConfig) core.Middleware
- func NewSave(c *SaveConfig) core.Middleware
- func NewSlack(c *SlackConfig) core.Middleware
- type Mail
- type MailConfig
- type Overlap
- type OverlapConfig
- type Save
- type SaveConfig
- type Slack
- type SlackConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewMail ¶
func NewMail(c *MailConfig) core.Middleware
NewMail returns a Mail middleware if the given configuration is not empty
func NewOverlap ¶
func NewOverlap(c *OverlapConfig) core.Middleware
NewOverlap returns a Overlap middleware if the given configuration is not empty
func NewSave ¶
func NewSave(c *SaveConfig) core.Middleware
NewSave returns a Save middleware if the given configuration is not empty
func NewSlack ¶
func NewSlack(c *SlackConfig) core.Middleware
NewSlack returns a Slack middleware if the given configuration is not empty
Types ¶
type Mail ¶
type Mail struct {
MailConfig
}
Mail middleware delivers a email just after an execution finishes
func (*Mail) ContinueOnStop ¶
ContinueOnStop return allways true, we want always report the final status
type MailConfig ¶
type MailConfig struct { SMTPHost string `gcfg:"smtp-host" mapstructure:"smtp-host"` SMTPPort int `gcfg:"smtp-port" mapstructure:"smtp-port"` SMTPUser string `gcfg:"smtp-user" mapstructure:"smtp-user"` SMTPPassword string `gcfg:"smtp-password" mapstructure:"smtp-password"` EmailTo string `gcfg:"email-to" mapstructure:"email-to"` EmailFrom string `gcfg:"email-from" mapstructure:"email-from"` MailOnlyOnError bool `gcfg:"mail-only-on-error" mapstructure:"mail-only-on-error"` }
MailConfig configuration for the Mail middleware
type Overlap ¶
type Overlap struct {
OverlapConfig
}
Overlap when this middleware is enabled avoid to overlap executions from a specific job
func (*Overlap) ContinueOnStop ¶
ContinueOnStop Overlap is only called if the process is still running
type OverlapConfig ¶
type OverlapConfig struct {
NoOverlap bool `gcfg:"no-overlap" mapstructure:"no-overlap"`
}
OverlapConfig configuration for the Overlap middleware
type Save ¶
type Save struct {
SaveConfig
}
Save the save middleware saves to disk a dump of the stdout and stderr after every execution of the process
func (*Save) ContinueOnStop ¶
ContinueOnStop return allways true, we want always report the final status
type SaveConfig ¶
type SaveConfig struct { SaveFolder string `gcfg:"save-folder" mapstructure:"save-folder"` SaveOnlyOnError bool `gcfg:"save-only-on-error" mapstructure:"save-only-on-error"` }
SaveConfig configuration for the Save middleware
type Slack ¶
type Slack struct {
SlackConfig
}
Slack middleware calls to a Slack input-hook after every execution of a job
func (*Slack) ContinueOnStop ¶
ContinueOnStop return allways true, we want alloways report the final status
type SlackConfig ¶
type SlackConfig struct { SlackWebhook string `gcfg:"slack-webhook" mapstructure:"slack-webhook"` SlackOnlyOnError bool `gcfg:"slack-only-on-error" mapstructure:"slack-only-on-error"` }
SlackConfig configuration for the Slack middleware